0

I am uploading a file to firebase bucket with this code

 const uplaodTask = await storage.bucket('example.appspot.com').upload('/temp/out.png', {
   destination: `/${jobID}/results/${filterName}.png`,
});

How can I get the public url of the uploaded file? I tried the following code but it's not working

 uplaodTask.getSignedUrl({
  action: 'read',
  expires: '03-09-2491'
}).then(signedUrls => {
  console.log("URL: ", signedUrls[0])
});
Dharmaraj
  • 47,845
  • 8
  • 52
  • 84
user567
  • 3,712
  • 9
  • 47
  • 80
  • Have you checked [Get Download URL from file uploaded with Cloud Functions for Firebase](https://stackoverflow.com/q/42956250/13130697) ? – Dharmaraj May 08 '22 at 17:30
  • Does this answer your question? [Get Download URL from file uploaded with Cloud Functions for Firebase](https://stackoverflow.com/questions/42956250/get-download-url-from-file-uploaded-with-cloud-functions-for-firebase) – Andres Fiesco Casasola May 09 '22 at 20:39

0 Answers0