0

in my Gcloud I have multiple folders and I have mp4 files in these folders so my question is how I can get the downloadable URL of this mp4 file using gsutil

1 Answers1

0

Download URLs are a concept that only exists in Firebase. Google Cloud doesn't know anything about them, which also means they can't be generated by the gsutil tool. To generate download URLs you'll need to use a client-side Firebase SDK.

The closest equivalent to download URLs that Cloud knows of, are its signed URLs. When used for downloads these are similar to Firebase's download URLs, but signed URLs always have a built-in expiration time.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Google Cloud has a public URL in the bucket using this public URL any user can easily access this file and I also have a Firebase SDK with google cloud my question is how I can get this with commands in my sh file. and is it possible with a curl request or something else? – Ankur Ranpariya Aug 30 '22 at 11:14
  • If you've made the entire bucket public, you can get URLs for each file/object in there by appending its name/path to the URL of the bucket. See https://stackoverflow.com/questions/67262810/how-to-get-list-of-public-urls-for-google-cloud-storage-with-nodejs-client-inste for an example of this. or https://stackoverflow.com/questions/39609497/listing-all-public-links-for-all-objects-in-a-bucket-using-gsutil – Frank van Puffelen Aug 30 '22 at 11:20
  • yes I already know that but my requirement is I need to send this public URL in an email to some specific people so I just need this URL using the command in my sh file but I have multiple folders and in these folders, I have multiple files so how I can get all file URLs one by one? 1. first how I can get my bucket folder name and his files one by one 2. how I can generate downloadable URLs of the files in this folder – Ankur Ranpariya Aug 30 '22 at 11:31
  • The answers to the first two questions I linked show how to list files *and* generate URLs for them. If that is somehow not working for you, it's more likely we can help if you show what you've tried - as the approach in those answers should really be how to do that. – Frank van Puffelen Aug 30 '22 at 12:37
  • i am done with this stuck thanks for the your time – Ankur Ranpariya Sep 12 '22 at 07:29