This commit is contained in:
Aevann1 2021-10-07 10:43:35 +02:00
parent 6151ae1580
commit cc966888e6
5 changed files with 11 additions and 10 deletions

View file

@ -491,7 +491,7 @@ def thumbnail_thread(pid):
db.close()
return
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(2)}.gif'
name = f'/images/{int(time.time())}{secrets.token_urlsafe(2)}.gif'
with open(name, "wb") as file:
for chunk in image_req.iter_content(1024):
@ -799,7 +799,7 @@ def submit_post(v):
), 403
if file.content_type.startswith('image/'):
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(2)}.gif'
name = f'/images/{int(time.time())}{secrets.token_urlsafe(2)}.gif'
file.save(name)
new_post.url = request.host_url[:-1] + process_image(name)