From 4f15b165ff6882725504aa175e891ada1e405418 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Wed, 13 Jul 2022 20:25:49 +0200 Subject: fix pdf extension upper case --- accounts/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'accounts') diff --git a/accounts/views.py b/accounts/views.py index ecaab4a..4a0be18 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -549,7 +549,7 @@ def personal_wrapper(request, errors): # if multiple files concatenate pictures im = Image.new("RGB", (0, 0), (255, 255, 255)) for f in files: - if f.name.endswith(".pdf"): + if f.name.endswith(".pdf") or f.name.endswith(".PDF"): images = convert_from_bytes(f.read()) for i in images: dst = Image.new('RGB', (max(im.width, i.width), im.height + i.height), (255, 255, 255)) @@ -588,7 +588,7 @@ def personal_wrapper(request, errors): # if multiple files concatenate pictures im = Image.new("RGB", (0, 0), (255, 255, 255)) for f in files: - if f.name.endswith(".pdf"): + if f.name.endswith(".pdf") or f.name.endswith(".PDF"): images = convert_from_bytes(f.read()) for i in images: dst = Image.new('RGB', (max(im.width, i.width), im.height + i.height), (255, 255, 255)) -- cgit v1.2.1