🐛 Fix S3 upload not working

This commit is contained in:
Mawoka
2024-06-16 12:28:54 +02:00
parent 7e5acf82c6
commit a686aca841
3 changed files with 90 additions and 82 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ async def upload_file(file: UploadFile = File(), user: User = Depends(get_curren
if user.storage_used > settings.free_storage_limit:
raise HTTPException(status_code=409, detail="Storage limit reached")
file_id = uuid4()
file_size = len(await file.read())
file_size = 0
file_obj = StorageItem(
id=file_id,
uploaded_at=datetime.now(),