fsdfsd
This commit is contained in:
parent
6151ae1580
commit
cc966888e6
5 changed files with 11 additions and 10 deletions
|
@ -244,7 +244,7 @@ def api_comment(v):
|
|||
file=request.files["file"]
|
||||
if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400
|
||||
|
||||
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)
|
||||
url = request.host_url[:-1] + process_image(name)
|
||||
|
||||
|
@ -654,7 +654,7 @@ def edit_comment(cid, v):
|
|||
file=request.files["file"]
|
||||
if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400
|
||||
|
||||
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)
|
||||
url = request.host_url[:-1] + process_image(name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue