forked from MarseyWorld/MarseyWorld
Fix video filesize check for patrons.
parent
1a033ecc74
commit
94e130febd
|
@ -89,7 +89,9 @@ def process_video(file):
|
|||
file.save(old)
|
||||
|
||||
size = os.stat(old).st_size
|
||||
if SITE_NAME != 'WPD' and (size > MAX_VIDEO_SIZE_MB * 1024 * 1024 or not g.v.patron and size > MAX_VIDEO_SIZE_MB_PATRON * 1024 * 1024):
|
||||
if (SITE_NAME != 'WPD' and
|
||||
(size > MAX_VIDEO_SIZE_MB_PATRON * 1024 * 1024
|
||||
or not g.v.patron and size > MAX_VIDEO_SIZE_MB * 1024 * 1024)):
|
||||
os.remove(old)
|
||||
abort(413, f"Max video size is {MAX_VIDEO_SIZE_MB} MB ({MAX_VIDEO_SIZE_MB_PATRON} MB for paypigs)")
|
||||
|
||||
|
|
Loading…
Reference in New Issue