Done
DevPlace CI / test (push) Failing after 3m27s

This commit is contained in:
2026-05-23 06:55:11 +02:00
parent 28bc8c1b74
commit 18c9f20090
4 changed files with 16 additions and 6 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import logging
from pathlib import Path
from fastapi import APIRouter, Request
from fastapi.responses import JSONResponse
from devplacepy.database import get_table, get_setting
from devplacepy.database import get_table, get_setting, get_int_setting
from devplacepy.utils import require_user
from devplacepy.attachments import store_attachment, delete_attachment as _delete_attachment, ALLOWED_UPLOAD_TYPES
@@ -40,7 +40,7 @@ async def upload_file(request: Request):
result = store_attachment(content, file.filename, user["uid"])
if result is None:
max_size_mb = int(get_setting("max_upload_size_mb", "10"))
max_size_mb = get_int_setting("max_upload_size_mb", 10)
return JSONResponse({"error": f"File exceeds {max_size_mb}MB limit"}, status_code=413)
logger.info(f"File uploaded: {file.filename} ({len(content)} bytes) -> {result['url']}")