manager: rewind uploaded image before checking its type

The behaviour on the jenkins host (different Pillow version?) is a bit
different and fails if the uploaded file is not rewinded.
This commit is contained in:
Frédéric Péters 2017-12-30 13:40:05 +01:00
parent adeaa387db
commit 8654f59e38
1 changed files with 1 additions and 0 deletions

View File

@ -467,6 +467,7 @@ class AssetOverwrite(FormView):
default_storage.delete(thumb)
saved_path = default_storage.save(img_orig, upload)
backend = ckeditor.image_processing.get_backend()
upload.seek(0) # rewind file to be sure
try:
backend.image_verify(upload)
except ckeditor.utils.NotAnImageException: