forked from MarseyWorld/MarseyWorld
increase max video size to 100MB
parent
e3149c2a7d
commit
9cee89afc5
|
@ -691,8 +691,7 @@ NOTIFICATION_THREAD = 1
|
||||||
MAX_IMAGE_SIZE_BANNER_RESIZED_MB = 1
|
MAX_IMAGE_SIZE_BANNER_RESIZED_MB = 1
|
||||||
MAX_IMAGE_AUDIO_SIZE_MB = 8
|
MAX_IMAGE_AUDIO_SIZE_MB = 8
|
||||||
MAX_IMAGE_AUDIO_SIZE_MB_PATRON = 16
|
MAX_IMAGE_AUDIO_SIZE_MB_PATRON = 16
|
||||||
MAX_VIDEO_SIZE_MB = 32
|
MAX_VIDEO_SIZE_MB = 100
|
||||||
MAX_VIDEO_SIZE_MB_PATRON = 64
|
|
||||||
MAX_IMAGE_CONVERSION_TIMEOUT = 30 # seconds
|
MAX_IMAGE_CONVERSION_TIMEOUT = 30 # seconds
|
||||||
|
|
||||||
ANTISPAM_BYPASS_IDS = set()
|
ANTISPAM_BYPASS_IDS = set()
|
||||||
|
|
|
@ -139,9 +139,7 @@ def process_video(file, v):
|
||||||
file.save(old)
|
file.save(old)
|
||||||
|
|
||||||
size = os.stat(old).st_size
|
size = os.stat(old).st_size
|
||||||
if (SITE_NAME != 'WPD' and
|
if (SITE_NAME != 'WPD' and size > MAX_VIDEO_SIZE_MB * 1024 * 1024):
|
||||||
(size > MAX_VIDEO_SIZE_MB_PATRON * 1024 * 1024
|
|
||||||
or not v.patron and size > MAX_VIDEO_SIZE_MB * 1024 * 1024)):
|
|
||||||
os.remove(old)
|
os.remove(old)
|
||||||
abort(413, f"Max video size is {MAX_VIDEO_SIZE_MB} MB ({MAX_VIDEO_SIZE_MB_PATRON} MB for paypigs)")
|
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