remotes/1693045480750635534/spooky-22
parent
50b2f06fc2
commit
5b0c0e0b21
|
@ -527,7 +527,7 @@ def thumbs(new_post):
|
|||
for chunk in image_req.iter_content(1024):
|
||||
file.write(chunk)
|
||||
|
||||
if 'pcmemes.ga' in request.host: post.thumburl = upload_ibb(filepath="image.webp", resize=True)
|
||||
if 'pcmemes.ga' in request.host: post.thumburl = upload_ibb(resize=True)
|
||||
else: post.thumburl = upload_imgur(filepath="image.webp", resize=True)
|
||||
|
||||
g.db.add(post)
|
||||
|
|
|
@ -505,11 +505,11 @@ def settings_images_profile(v):
|
|||
filepath = f"image.{format}"
|
||||
file.save(filepath)
|
||||
|
||||
if 'pcmemes.ga' in request.host: highres = upload_ibb(filepath=filepath)
|
||||
if 'pcmemes.ga' in request.host: highres = upload_ibb()
|
||||
else: highres = upload_imgur(filepath=filepath)
|
||||
if not highres: abort(400)
|
||||
|
||||
if 'pcmemes.ga' in request.host: imageurl = upload_ibb(filepath=filepath, resize=True)
|
||||
if 'pcmemes.ga' in request.host: imageurl = upload_ibb(resize=True)
|
||||
else: imageurl = upload_imgur(filepath=filepath, resize=True)
|
||||
if not imageurl: abort(400)
|
||||
|
||||
|
|
Loading…
Reference in New Issue