fix: video activites issue

This commit is contained in:
swve 2023-04-13 21:33:03 +02:00
parent 137a909347
commit 86645fa81a
5 changed files with 38 additions and 7 deletions

View file

@ -4,6 +4,11 @@ import os
async def upload_video(video_file, activity_id):
contents = video_file.file.read()
video_format = video_file.filename.split(".")[-1]
if not os.path.exists("content/uploads/video"):
# create folder
os.mkdir("content/uploads/video")
# create folder
os.mkdir(f"content/uploads/video/{activity_id}")