forked from rDrama/rDrama
fix 413 error for patrons
parent
c02c53dde6
commit
e1d0269a81
|
@ -91,9 +91,7 @@ def process_video(file):
|
||||||
def process_image(filename=None, resize=0):
|
def process_image(filename=None, resize=0):
|
||||||
size = os.stat(filename).st_size
|
size = os.stat(filename).st_size
|
||||||
|
|
||||||
if resize == 100: patron = False
|
if resize != 100:
|
||||||
else: patron = g.v.patron
|
|
||||||
|
|
||||||
if size > 16 * 1024 * 1024 or not patron and size > 8 * 1024 * 1024:
|
if size > 16 * 1024 * 1024 or not patron and size > 8 * 1024 * 1024:
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
abort(413)
|
abort(413)
|
||||||
|
|
Loading…
Reference in New Issue