Added download method for photos.

This commit is contained in:
Batuhan Berk Başoğlu 2020-10-06 20:36:05 -04:00
parent cef3dc6fc0
commit 752b77670a

View file

@ -96,5 +96,7 @@ class DBHelper:
userphoto_str = str(userphoto) userphoto_str = str(userphoto)
storage.child(userphoto_str).put(userphoto) storage.child(userphoto_str).put(userphoto)
# Downloads the photo, input should be something like "Photos_of_Users/example.png"
def downloadphoto(userphoto):
userphoto_str = str(userphoto)
storage.child("Photos_of_Users/" + userphoto_str).download("Storage_from_Database/" + userphoto_str)