Add thumb exists check
This commit is contained in:
parent
4af1885757
commit
f9191892cf
2
app.py
2
app.py
|
@ -239,7 +239,7 @@ def upload_file(over_write=1):
|
||||||
@app.route("/thumb/<media>")
|
@app.route("/thumb/<media>")
|
||||||
@auth.login_required
|
@auth.login_required
|
||||||
def get_thumbnail(media):
|
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')
|
return send_file(thumbnails_folder + os.sep + media + ".jpg", mimetype='image/jpg')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue