0001-misc-create-thumbnail-as-jpeg-in-case-of-unknown-fil.patch
ckeditor/image/pillow_backend.py | ||
---|---|---|
24 | 24 | |
25 | 25 |
def create_thumbnail(file_path): |
26 | 26 |
thumbnail_filename = utils.get_thumb_filename(file_path) |
27 |
thumbnail_format = utils.get_image_format(os.path.splitext(file_path)[1]) |
|
27 |
try: |
|
28 |
thumbnail_format = utils.get_image_format(os.path.splitext(file_path)[1]) |
|
29 |
except KeyError: |
|
30 |
thumbnail_format = 'image/jpeg' |
|
28 | 31 |
file_format = thumbnail_format.split('/')[1] |
29 | 32 | |
30 | 33 |
image = default_storage.open(file_path) |
31 |
- |