forked from rDrama/rDrama
dfd
parent
e58c49c2c9
commit
912570cb38
|
@ -48,7 +48,7 @@ def upload_file(file, resize=None):
|
|||
else:
|
||||
req = requests.post('https://api.imgur.com/3/upload.json', headers = {"Authorization": f"Client-ID {imgurkey}"}, data = {'image': base64.b64encode(file.read())})
|
||||
try: resp = req.json()['data']
|
||||
except Exception as e:
|
||||
except:
|
||||
print(req.text)
|
||||
return
|
||||
|
||||
|
|
|
@ -330,6 +330,8 @@ def settings_images_profile(v):
|
|||
|
||||
imageurl = upload_file(request.files["profile"], (100,100))
|
||||
print(imageurl)
|
||||
highres = upload_file(request.files["profile"])
|
||||
print(highres)
|
||||
|
||||
return render_template("settings_profile.html",
|
||||
v=v, msg="Profile picture successfully updated.")
|
||||
|
|
Loading…
Reference in New Issue