-
Notifications
You must be signed in to change notification settings - Fork 0
/
save.py
28 lines (23 loc) · 709 Bytes
/
save.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@app.route("/preferences")
def preferences():
user = supabase.auth.get_user()
if user:
# print(user)
return render_template("preferences.html")
else:
return render_template("login.html")
@app.route("/uploads/top")
def display_top():
# Get image data from the database
print("Yahoo")
# image_data = get_image_from_database(image_id)
with open("uploads/top.jpg", "rb") as f:
image_data = f.read()
# Return image data as response
return image_data
@app.route("/uploads/bottom")
def display_bottom():
# Get image data from the database
with open("uploads/bottom.jpg", "rb") as f:
image_data = f.read()
return image_data