forked from rDrama/rDrama
master
parent
d6fa23b1f3
commit
9c84ec4b19
|
@ -17,6 +17,7 @@ def upload_ibb(filepath=None, file=None, resize=False):
|
||||||
format = file.filename.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png')
|
format = file.filename.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png')
|
||||||
filepath = f"image.{format}"
|
filepath = f"image.{format}"
|
||||||
file.save(filepath)
|
file.save(filepath)
|
||||||
|
else: format = filepath.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png')
|
||||||
|
|
||||||
if resize:
|
if resize:
|
||||||
i = IImage.open(filepath)
|
i = IImage.open(filepath)
|
||||||
|
@ -58,6 +59,7 @@ def upload_imgur(filepath=None, file=None, resize=False):
|
||||||
format = file.filename.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png')
|
format = file.filename.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png')
|
||||||
filepath = f"image.{format}"
|
filepath = f"image.{format}"
|
||||||
file.save(filepath)
|
file.save(filepath)
|
||||||
|
else: format = filepath.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png')
|
||||||
|
|
||||||
if resize:
|
if resize:
|
||||||
i = IImage.open(filepath)
|
i = IImage.open(filepath)
|
||||||
|
|
Loading…
Reference in New Issue