1

I am using firebase storage to try and store user profile pictures. I am then downloading them from the database to my static/uploads folder, like in many flask examples, then using that to display a user's profile picture. I am using pyrebase 4 to download the picture from my firebase storage; however, whenever I try to download it, the file goes it the '/' path instead of my 'static/uploads folder'. I am specifying how to download it like this storage.child(user + "/profilepicture.png").download(path="/static/uploads", filename=user + ".png")

I am not really sure what I am doing wrong, shouldn't it be going to the path I specified? The pyrebase documentation doesn't tell you how to specify the path. I am a bit confused.

  • Hello! Could you please add some examples of what you are trying to do? You can also help yourself by following the guide: https://stackoverflow.com/help/how-to-ask – toshiro92 Jan 09 '22 at 00:48

1 Answers1

0

I had the same problem and find that i need to add the path with the image name as image name parameter and also add path parameter, Like this

storage.child("toPrint/"+imageName).download(IMAGE_DOWNLOAD_PATH,IMAGE_DOWNLOAD_PATH+downloadedImageName+".jpg")

The documentation is not up-to-date for now and if you used the same code you will get an error because you need to add path parameter, Check this github issue

Yousef Elsayed
  • 115
  • 2
  • 8