From 5b0c0e0b2172fdb3f478fe9c62834945995374a5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 13 Sep 2021 18:38:30 +0200 Subject: [PATCH] fd --- files/routes/posts.py | 2 +- files/routes/settings.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 95c653355..63b7fd0a2 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -527,7 +527,7 @@ def thumbs(new_post): for chunk in image_req.iter_content(1024): file.write(chunk) - if 'pcmemes.ga' in request.host: post.thumburl = upload_ibb(filepath="image.webp", resize=True) + if 'pcmemes.ga' in request.host: post.thumburl = upload_ibb(resize=True) else: post.thumburl = upload_imgur(filepath="image.webp", resize=True) g.db.add(post) diff --git a/files/routes/settings.py b/files/routes/settings.py index 320ef2501..a6a279bd7 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -505,11 +505,11 @@ def settings_images_profile(v): filepath = f"image.{format}" file.save(filepath) - if 'pcmemes.ga' in request.host: highres = upload_ibb(filepath=filepath) + if 'pcmemes.ga' in request.host: highres = upload_ibb() else: highres = upload_imgur(filepath=filepath) if not highres: abort(400) - if 'pcmemes.ga' in request.host: imageurl = upload_ibb(filepath=filepath, resize=True) + if 'pcmemes.ga' in request.host: imageurl = upload_ibb(resize=True) else: imageurl = upload_imgur(filepath=filepath, resize=True) if not imageurl: abort(400)