From e6ecce79ee6d90420a409442d0d90a9469dfe151 Mon Sep 17 00:00:00 2001 From: Audit Bot Date: Tue, 30 Jun 2026 09:24:27 +0800 Subject: [PATCH] fix: rename OSS_DIRECT_UPLOAD_EXPRESS_SECRET to OSS_DIRECT_UPLOAD_EXPIRE_SECONDS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause of upload endpoint 500 errors: - config.py defined OSS_DIRECT_UPLOAD_EXPRESS_SECRET (wrong name) - upload.py accessed settings.OSS_DIRECT_UPLOAD_EXPIRE_SECONDS (correct name) - AttributeError on every call to prepare_direct_upload → 500 This fixes both /api/v1/upload/prepare-direct-upload and any other upload endpoints that reference the expire seconds config. --- apps/api/app/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/app/config.py b/apps/api/app/config.py index 00f6c9b92..778492c04 100755 --- a/apps/api/app/config.py +++ b/apps/api/app/config.py @@ -87,7 +87,7 @@ class Settings(BaseSettings): default=2000, validation_alias=AliasChoices("OSS_DIRECT_UPLOAD_MAX_MB", "MAX_UPLOAD_SIZE_MB"), ) - OSS_DIRECT_UPLOAD_EXPRESS_SECRET: int = 900 + OSS_DIRECT_UPLOAD_EXPIRE_SECONDS: int = 900 LOG_LEVEL: str = "INFO" CORS_ORIGINS_RAW: str = ( -- 2.54.0