feat: rename lectures to activities across the app

This commit is contained in:
swve 2023-03-23 22:57:36 +01:00
parent bc2def6178
commit 7b63eb573c
51 changed files with 570 additions and 570 deletions

View file

@ -1,18 +0,0 @@
import os
async def upload_video(video_file, lecture_id):
contents = video_file.file.read()
video_format = video_file.filename.split(".")[-1]
# create folder
os.mkdir(f"content/uploads/video/{lecture_id}")
try:
with open(f"content/uploads/video/{lecture_id}/video.{video_format}", 'wb') as f:
f.write(contents)
f.close()
except Exception as e:
return {"message": "There was an error uploading the file"}
finally:
video_file.file.close()