diff --git a/files/routes/posts.py b/files/routes/posts.py index 42f60a855..36176934e 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -18,6 +18,7 @@ from .front import frontlist, changeloglist from urllib.parse import ParseResult, urlunparse, urlparse, quote from os import path import requests +from shutil import copyfile site = environ.get("DOMAIN").strip() site_name = environ.get("SITE_NAME").strip() @@ -1028,7 +1029,10 @@ def submit_post(v): name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp' file.save(name) new_post.url = process_image(name) - new_post.thumburl = process_image(name, True) + + name2 = name.replace('.webp', 'r.webp') + copyfile(name, name2) + new_post.thumburl = process_image(name2, True) elif file.content_type.startswith('video/'): file.save("video.mp4") diff --git a/files/routes/users.py b/files/routes/users.py index 96775f77c..974a843a0 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -257,7 +257,7 @@ def transfer_coins(v, username): @limiter.limit("1/second") @is_not_banned @validate_formkey -def transfer_coins(v, username): +def transfer_bux(v, username): receiver = g.db.query(User).filter_by(username=username).first() if not receiver: return {"error": "That user doesn't exist."}, 404