From bef91b3243c0f9ed26842f09f7661092d8d14a9e Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 19 Apr 2018 19:23:10 -0700 Subject: [PATCH] Allow /file/ to be accessed with a basename. --- .../etiquette_flask/endpoints/photo_endpoints.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontends/etiquette_flask/etiquette_flask/endpoints/photo_endpoints.py b/frontends/etiquette_flask/etiquette_flask/endpoints/photo_endpoints.py index 8981314..353ceba 100644 --- a/frontends/etiquette_flask/etiquette_flask/endpoints/photo_endpoints.py +++ b/frontends/etiquette_flask/etiquette_flask/endpoints/photo_endpoints.py @@ -31,7 +31,8 @@ def get_photo_json(photo_id): return photo @site.route('/file/') -def get_file(photo_id): +@site.route('/file//') +def get_file(photo_id, basename=None): photo_id = photo_id.split('.')[0] photo = common.P.get_photo(photo_id)