Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do you get the upload URL of a backend server so you can upload data to it?

I am trying to upload some data to firebase storage by using an upload URL instead of the traditional way by using:
Storage.storage().reference().child("Name").putFile("file name")

The reason that I need the URL instead of going the traditional route is because I need to use URLSession to upload data so my task can finish uploading in the background if the user closes out of the app during the upload time.

Summary:
How do you get the URL of my firebase storage so I can directly upload data through my URL using URLSession instead of using the traditional route?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Thanks in advance! Let me know if you have any questions.

>Solution :

There is no way to generate a signed upload URL through the Firebase SDKs for Cloud Storage.

If you want to upload using an upload URL, you’ll have to generate the upload URL with one of the GCP SDKs or the REST API (all of which are designed to be used in trusted environments only), and share that with your clients (for example through the Firebase Realtime Database or Firestore, or a custom API endpoint you create in Cloud Functions/Cloud Run).

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading