From 752b77670a9efa4dd3c6a65f42fd3beaabf32edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Berk=20Ba=C5=9Fo=C4=9Flu?= Date: Tue, 6 Oct 2020 20:36:05 -0400 Subject: [PATCH] Added download method for photos. --- DBHelper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DBHelper.py b/DBHelper.py index 2bcdbbb07..f74d2e57c 100644 --- a/DBHelper.py +++ b/DBHelper.py @@ -96,5 +96,7 @@ class DBHelper: userphoto_str = str(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)