Umid Boltabaev
Umid Boltabaev

Reputation: 692

How to get storage location URL of uploaded image on Firebase?

I have that code which I get download URL:

uploadTask.snapshot.ref.getDownloadURL().then(async function(downloadURL) {

});

I need also file storage location URL as well.

Upvotes: 0

Views: 524

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317828

Your uploadTask.snapshot.ref is a Reference type object. The API documentation for that object suggests that the toString() method will give you a gs:// URL for that reference.

Upvotes: 1

Related Questions