diff options
author | cyfraeviolae <cyfraeviolae> | 2022-08-27 05:46:17 -0400 |
---|---|---|
committer | cyfraeviolae <cyfraeviolae> | 2022-08-27 05:46:17 -0400 |
commit | 36b27e733c83e02ac54d7a6c1aa0a43938d1fc1f (patch) | |
tree | 23f97f54ec8390c782a4a6aa34135e95894570b0 /app.py | |
parent | 00e2704d0039ed9dbbfec54b2643da395f642f66 (diff) |
key com
Diffstat (limited to 'app.py')
-rw-r--r-- | app.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -133,7 +133,8 @@ def FileSizeLimit(max_bytes, magic_start=None, magic_end=None): if not field.data: return s = field.data.read() - n = len(field.data.read()) + n = len(s) + print(max_bytes, n) if n > max_bytes: raise ValidationError(f"File size must be less than {max_bytes}B") if magic_start and not s.startswith(magic_start): |