misc: fix check for PDF thumbnails support (#27722)
This commit is contained in:
parent
9719d0ade6
commit
7d05ea914f
|
@ -561,8 +561,8 @@ def file_digest(content, chunk_size=100000):
|
|||
|
||||
|
||||
def can_thumbnail(content_type):
|
||||
if content_type == 'application/pdf' and not (HAS_GM and Image):
|
||||
return False
|
||||
if content_type == 'application/pdf':
|
||||
return bool(HAS_GM and Image)
|
||||
if content_type and content_type.startswith('image/'):
|
||||
return bool(Image is not None)
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue