Allow /file/ to be accessed with a basename.

This commit is contained in:
voussoir 2018-04-19 19:23:10 -07:00
parent 79465b803e
commit bef91b3243

View file

@ -31,7 +31,8 @@ def get_photo_json(photo_id):
return photo return photo
@site.route('/file/<photo_id>') @site.route('/file/<photo_id>')
def get_file(photo_id): @site.route('/file/<photo_id>/<basename>')
def get_file(photo_id, basename=None):
photo_id = photo_id.split('.')[0] photo_id = photo_id.split('.')[0]
photo = common.P.get_photo(photo_id) photo = common.P.get_photo(photo_id)