/** * TODO(developer): Uncomment the following lines before running the sample. */// The ID of your GCS bucket// const bucketName = 'your-unique-bucket-name';// The contents that you want to upload// const contents = 'these are my contents';// The new ID for your GCS file// const destFileName = 'your-new-file-name';// Imports the Google Cloud Node.js client libraryconst{Storage}=require('@google-cloud/storage');// Creates a clientconststorage=newStorage();asyncfunctionuploadWithoutAuthenticationCreateResumableUploadStrategy(){constfile=storage.bucket(bucketName).file(destFileName);// Returns an authenticated endpoint to which// you can make requests without credentials.const[location]=awaitfile.createResumableUpload();//auth required// Passes the location to file.save so you don't need to// authenticate this callawaitfile.save(contents,{uri:location,resumable:true,validation:false,});console.log(`${destFileName} uploaded to ${bucketName}`);}uploadWithoutAuthenticationCreateResumableUploadStrategy().catch(console.error);
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],[],[],[]]