forked from rDrama/rDrama
Merge remote-tracking branch 'origin/master'
commit
b73f82b69a
|
@ -501,20 +501,11 @@ def settings_images_profile(v):
|
||||||
if request.headers.get("cf-ipcountry") == "T1": return "Image uploads are not allowed through TOR.", 403
|
if request.headers.get("cf-ipcountry") == "T1": return "Image uploads are not allowed through TOR.", 403
|
||||||
|
|
||||||
file = request.files["profile"]
|
file = request.files["profile"]
|
||||||
format = file.filename.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png')
|
filepath = "image.webp"
|
||||||
filepath = f"image.{format}"
|
|
||||||
file.save(filepath)
|
file.save(filepath)
|
||||||
|
|
||||||
if 'pcmemes.net' in request.host:
|
if 'pcmemes.net' in request.host: highres = upload_ibb()
|
||||||
file = request.files["profile"]
|
else: highres = upload_imgur(filepath=filepath)
|
||||||
file.save("image.webp")
|
|
||||||
highres = upload_ibb()
|
|
||||||
else:
|
|
||||||
file = request.files["profile"]
|
|
||||||
format = file.filename.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png')
|
|
||||||
filepath = f"image.{format}"
|
|
||||||
file.save(filepath)
|
|
||||||
highres = upload_imgur(filepath=filepath)
|
|
||||||
if not highres: abort(400)
|
if not highres: abort(400)
|
||||||
|
|
||||||
if 'pcmemes.net' in request.host: imageurl = upload_ibb(resize=True)
|
if 'pcmemes.net' in request.host: imageurl = upload_ibb(resize=True)
|
||||||
|
|
Loading…
Reference in New Issue