2

Is there any way possible to get a direct URL to download the media file which I have uploaded onto the Firebase storage using my Android app?.

  1. Scenario 1 :- I am basically looking for a http or a https URL which I can paste it in the browser and the image can be downloaded.

  2. Scenario 2:- I can get a public url so that I can write a download manager in my web app which can download the images from these urls.

Also, If possible I want it to be completely independent of any reference of firebase database.

Thanks in advance.

Shikhar varshney
  • 816
  • 1
  • 9
  • 23
  • Once you have a reference to a file in Firebase Storage, you can [get its download URL](https://firebase.google.com/docs/storage/android/download-files#download_data_via_url), which is a publicly accessible but unguessable URL for that file. There is no API to get a listing of the files in Firebase Storage. You seem to already know that, so what makes your question different from [this one](http://stackoverflow.com/questions/37335102/how-to-get-an-array-with-all-pictures)? – Frank van Puffelen Dec 12 '16 at 16:13

2 Answers2

3

When you upload the file, a URL for the stored file is available in the returned UploadTask.TaskSnapshot. You can also obtain the URL from a StorageReference using getDownLoadUrl().

An example can be found in the Firebase Quickstart project.

Bob Snyder
  • 37,759
  • 6
  • 111
  • 158
0

You can use Fibrebase SDK on your server-side to download any stored file to serve it when a client requests it by name for example.

Andrey M.
  • 21
  • 1
  • 7