diff --git a/files/helpers/images.py b/files/helpers/images.py index 3ac38ce9ed..e4bb22a03e 100644 --- a/files/helpers/images.py +++ b/files/helpers/images.py @@ -42,7 +42,7 @@ def upload_ibb(filepath=None, file=None, resize=False): return url -def upload_ibb(filepath=None, file=None, resize=False): +def upload_imgur(filepath=None, file=None, resize=False): if filepath: file = IImage.open(file) file.save(f"image.{file.format}", optimize=True, quality=30) diff --git a/files/routes/admin.py b/files/routes/admin.py index 0df9a9fb77..973dc965a0 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -3,7 +3,6 @@ import calendar from sqlalchemy.orm import lazyload import imagehash from os import remove -from os.path import exists from PIL import Image as IMAGE from files.helpers.wrappers import * diff --git a/files/routes/posts.py b/files/routes/posts.py index 61d193457c..666fc23199 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -497,7 +497,6 @@ def thumbs(new_post): image = PILimage.open(BytesIO(x.content)) else: - print(f'Unknown content type {x.headers.get("Content-Type")}') return False, f'Unknown content type {x.headers.get("Content-Type")} for submitted content'