Add thumb exists check

This commit is contained in:
ABelliqueux 2022-11-24 20:19:27 +01:00
parent 4af1885757
commit f9191892cf
1 changed files with 2 additions and 2 deletions

2
app.py
View File

@ -239,7 +239,7 @@ def upload_file(over_write=1):
@app.route("/thumb/<media>")
@auth.login_required
def get_thumbnail(media):
if media:
if media and os.path.exists(thumbnails_folder + os.sep + media):
return send_file(thumbnails_folder + os.sep + media + ".jpg", mimetype='image/jpg')