Open lohriialo opened 6 years ago
When upload a file to storage while logged in as a user, it will return a response JSON that has a downloadToken
property. You need to store this somewhere, then call get_url(token)
with that downloadToken.
seems like what we get on uploading is not a JSON file. I got this error upon trying to do as you advised 'NoneType' object is not subscriptable
Does file.metadata contain 'firebaseStorageDownloadTokens'? Because the blobs returned by firebase_admin library contain a metadata attribute. The tokens appear to be there.
blobs = storage_bucket.list_blobs()
for blob in blobs:
print(blob.metadata['firebaseStorageDownloadTokens'])
I'm using service account, trying to get the download url of all the assets in my storage but I don't see a way, help please
This gives me the storage url like so but the token is missing:
https://firebasestorage.googleapis.com/v0/b/projectid.appspot.com/o/file.jpg?alt=media
How can I get the token for the file?