Peter Fortuin
Peter Fortuin

Reputation: 5228

Can Firebase storage work with Cloud Storage signed urls?

I have a backend that give my Androids app a signed url that it can use to upload files. Now I want to extend that with resumable uploads and progress listeners. I was wondering if it would be possible to use Firebase Storage to make uploads from my Android App using the signed urls. I have tried to use

FirebaseStorage.getReferenceFromUrl(<signed-url>)

but that will give me the following exception:

java.lang.IllegalArgumentException: Firebase Storage URLs must point to an object in your Storage Bucket. Please obtain a URL using the Firebase Console or getDownloadUrl().
    at com.google.firebase.storage.internal.Util.normalize(com.google.firebase:firebase-storage@@19.1.0:135)
    at com.google.firebase.storage.FirebaseStorage.getReferenceFromUrl(com.google.firebase:firebase-storage@@19.1.0:254)
....

Is there any other way to make Firebase storage for Android work with signed urls from Cloud Storage?

Upvotes: 0

Views: 684

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317477

The Firebase SDKs for Cloud Storage don't recognize the signed URLs generated by Cloud SDKs. They only recognize their own URLs generated by getDownloadURL from the client SDK. Unfortunately, it's also not possible to generate a Firebase-compatible URL on the backend using a Cloud SDK.

Upvotes: 2

Related Questions