mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Clean up theme compiler and thumbnail generation
Fix signup not clearning blanks - Thanks to Fennec
This commit is contained in:
parent
0e24004c0b
commit
95e5f3938f
7 changed files with 55 additions and 73 deletions
|
@ -33,6 +33,7 @@ def file(file_name):
|
|||
r for resolution, 400x400 or thumb for thumbnail
|
||||
"""
|
||||
res = request.args.get('r', default=None, type=str) # Type of file (thumb, etc)
|
||||
ext = request.args.get('e', default=None, type=str) # File extension
|
||||
file_name = secure_filename(file_name) # Sanitize file name
|
||||
|
||||
# if no args are passed, return the raw file
|
||||
|
@ -42,7 +43,7 @@ def file(file_name):
|
|||
|
||||
return send_from_directory(current_app.config['UPLOAD_FOLDER'], file_name)
|
||||
|
||||
thumb = generate_thumbnail(file_name, res)
|
||||
thumb = generate_thumbnail(file_name, res, ext)
|
||||
|
||||
if not thumb:
|
||||
abort(404)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue