0

I'm not able to make this work, I want to upload a picture to firebase with pyrebase and the file(picture) goes through but it never loads on firebase/storage (see picture attached)

Image from Firebase/Storage

This is the code:

if request.method == 'POST':
    upload = request.files['upload']
    upload.save(os.path.join(UPLOAD_FOLDER, filename))
    storage.child("images/test.jpg").put(UPLOAD_FOLDER+filename)
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Alberto Rocha
  • 553
  • 1
  • 5
  • 16

2 Answers2

2

Last I heard, there is a bug in the Firebase console where images don't load if they were uploaded using one of the backend SDKs (as opposed to one of the Firebase client SDKs, or the Firebase console). It uses the "access token" that you would see in the "File location" section for that file. If there is no access token, the console won't know how to load the file.

If this is indeed the case for you, please file a bug with Firebase support. It's a known issue, but the report will let them know how many people are affected.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
0

Clicking Create new access token under File Location solves the issue.

ahajib
  • 12,838
  • 29
  • 79
  • 120