|
@@ -120,9 +120,9 @@ async def create_upload_file(file: UploadFile = File(...)):
|
|
|
try:
|
|
|
if file.content_type=='video/mp4':
|
|
|
async with aiofiles.open(img_upload_folder+img_name+'.mp4', 'wb') as out_file:
|
|
|
- content = await in_file.read()
|
|
|
- await out_file.write(content)
|
|
|
- else :
|
|
|
+ content = await in_file.read()
|
|
|
+ await out_file.write(content)
|
|
|
+ else:
|
|
|
contents = await file.read()
|
|
|
image = Image.open(io.BytesIO(contents))
|
|
|
image= image.convert("RGB")
|