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,9 @@ import os
async def upload_thumbnail(thumbnail_file, name_in_disk):
contents = thumbnail_file.file.read()
try:
if not os.path.exists("content/uploads/img"):
os.makedirs("content/uploads/img")
with open(f"content/uploads/img/{name_in_disk}", 'wb') as f:
f.write(contents)
f.close()