feat: refactor the entire learnhouse project

This commit is contained in:
swve 2023-10-13 20:03:27 +02:00
parent f556e41dda
commit 4c215e91d5
247 changed files with 7716 additions and 1013 deletions

View file

@ -0,0 +1,18 @@
from src.services.utils.upload_content import upload_content
async def upload_video(video_file, activity_id, org_id, course_id):
contents = video_file.file.read()
video_format = video_file.filename.split(".")[-1]
try:
await upload_content(
f"courses/{course_id}/activities/{activity_id}/video",
org_id,
contents,
f"video.{video_format}",
)
except Exception:
return {"message": "There was an error uploading the file"}