Question: We are using linux/cloud shell for this project and using javascript. I am trying to generate a number along with file type. after image is

We are using linux/cloud shell for this project and using javascript. I am trying to generate a number along with file type. after image is copied to the final bucket from source bucket, it is suppose to generate a number and file type in final bucket. I have provided my code below. It is copying the image to final bucket but not generating number and the type. Please assist.

async function copyFile(){

await storage

.bucket(file.bucket)

.file(file.name)

.copy(storage.bucket('final bucket').file("${file.generation}.{contentType}"));

console.log(

'gs://${sourceBucket}/${newFile} copied to gs://${finalBucket}/${newFile}.'

);

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!