How to get uploaded images download URL &Token on Firebase using Python.

1,728 views
Skip to first unread message

Bytech Mobile Apps

unread,
Aug 26, 2019, 10:44:36 AM8/26/19
to Firebase Google Group
I am uploading an image into fire-base and trying to get download URL from which i can send that image to the App.


i tried these two methods 
path=imageBlob.public_url-

but this URL is not working to send the the image to the app i want the firebase downloadURL which contains alt=media&token=980d472d-1639-470c-94e5-42f0635ce89c

Another method I tried:

storage.child("images/example").getDownloadURL(token) And in this method HOW TO GET THE TOKEN

Here is my code snippet:

storage.child("images/example").getDownloadURL(token)
 imagePath = "D:\\Chatbot\\output.png"
 imageBlob.upload_from_filename(imagePath)
 path=imageBlob.public_url


storage.child("images/example").getDownloadURL(token) in this method it is asking to pass the token but its not the Bearer or User token it is the token which is added in the link of image which we can get in firebase. 

Guanaco Devs

unread,
Aug 26, 2019, 4:25:25 PM8/26/19
to fireba...@googlegroups.com
Have you checked your rules?
The public url you get should work, but your rules may be blocking access, if an android app, you should check the logcat for a "Permission Denied" error

Thank You & Best Regards
Edgard Ochoa
Guanaco Devs


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/128422b5-3f26-45c4-902e-95c0b086379d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages