sharp icon indicating copy to clipboard operation
sharp copied to clipboard

How i can use output path to upload images in Google Cloud?

Open dieg0almeida opened this issue 6 years ago • 2 comments

I need upload images to Google Cloud, but when i try appear this error: [Error: ENOENT: no such file or directory, stat './myfilename.jpg'] But the file exists local in machine. The code is bellow.

await sharp(imagePath).resize(500, 500).toFile(imageResizedPath); await storage.bucket(firebaseConfig.storageBucket) .upload(imageResizedPath, { gzip: true, metadata: { cacheControl: 'public, max-age=31536000' } });

Somebody help me please?

dieg0almeida avatar Jun 22 '20 00:06 dieg0almeida

Please can you provide a complete, standalone code sample, perhaps as a separate repo, that allows someone else to consistently reproduce the problem.

lovell avatar Jun 22 '20 09:06 lovell

Closing due to inactivity but please feel free to reopen with more details if further help is required.

lovell avatar Jul 16 '20 13:07 lovell