mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-13 01:33:16 +00:00
Check image file size before the format
Checking the file format may take a long time if the uploaded file is very big so it makes sense to check the file size first to prevent the server being held up unneccessarily.
This commit is contained in:
parent
ffec059c12
commit
4a6a09ec13
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ class WagtailImageField(ImageField):
|
|||
def to_python(self, data):
|
||||
f = super(WagtailImageField, self).to_python(data)
|
||||
|
||||
self.check_image_file_format(f)
|
||||
self.check_image_file_size(f)
|
||||
self.check_image_file_format(f)
|
||||
|
||||
return f
|
||||
|
|
|
|||
Loading…
Reference in a new issue