forked from rDrama/rDrama
fggf
parent
ba788bef50
commit
e8caeb1b2c
|
@ -742,8 +742,7 @@ def edit_comment(cid, v):
|
||||||
|
|
||||||
if request.files.get("file"):
|
if request.files.get("file"):
|
||||||
file=request.files["file"]
|
file=request.files["file"]
|
||||||
if not file.content_type.startswith('image/'):
|
if not file.content_type.startswith('image/'): return jsonify({"error": "That wasn't an image!"}), 400
|
||||||
return jsonify({"error": "That wasn't an image!"}), 400
|
|
||||||
|
|
||||||
name = f'comment/{c.base36id}/{secrets.token_urlsafe(8)}'
|
name = f'comment/{c.base36id}/{secrets.token_urlsafe(8)}'
|
||||||
url = upload_file(name, file)
|
url = upload_file(name, file)
|
||||||
|
|
Loading…
Reference in New Issue