dgfdgf
This commit is contained in:
parent
9c486d1e23
commit
90cd86dc3d
23 changed files with 21 additions and 33 deletions
|
@ -487,7 +487,7 @@ def thumbnail_thread(pid):
|
|||
db.close()
|
||||
return
|
||||
|
||||
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}.gif'
|
||||
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(2)}.gif'
|
||||
|
||||
with open(name, "wb") as file:
|
||||
for chunk in image_req.iter_content(1024):
|
||||
|
@ -797,7 +797,7 @@ def submit_post(v):
|
|||
), 403
|
||||
|
||||
if file.content_type.startswith('image/'):
|
||||
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}.gif'
|
||||
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(2)}.gif'
|
||||
file.save(name)
|
||||
new_post.url = request.host_url[:-1] + process_image(name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue