mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: video activites issue
This commit is contained in:
parent
137a909347
commit
86645fa81a
5 changed files with 38 additions and 7 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue