feat: init and add video extension to editor/canva

This commit is contained in:
swve 2022-12-14 17:49:21 +01:00
parent 8d0efdb93e
commit 9f916449c5
9 changed files with 163 additions and 10 deletions

View file

@ -55,7 +55,8 @@ async def create_video_file(video_file: UploadFile, element_id: str):
)
# create folder for element
os.mkdir(f"content/uploads/files/videos/{element_id}")
if not os.path.exists(f"content/uploads/files/videos/{element_id}"):
os.mkdir(f"content/uploads/files/videos/{element_id}")
# upload file to server
with open(f"content/uploads/files/videos/{element_id}/{file_id}.{file_format}", 'wb') as f: