From 8188985029fd6d60fc9ddf21b3c79a3d41f5916d Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 22 May 2026 22:23:29 -0400 Subject: [PATCH] fc5: lift Quart request body cap to 1 GiB so large IR exports don't 413 Co-Authored-By: Claude Opus 4.7 (1M context) --- backend/app/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/app/__init__.py b/backend/app/__init__.py index a566a62..3298a3c 100644 --- a/backend/app/__init__.py +++ b/backend/app/__init__.py @@ -23,6 +23,12 @@ def create_app() -> Quart: app = Quart(__name__) app.secret_key = cfg.secret_key + # FC-5: legacy IR ingest JSON can run to tens of MB (hundreds of + # thousands of image_tag_associations). Werkzeug's default form + # memory cap is 500KB; raise both ceilings so the multipart upload + # for /api/migrate/ir_ingest doesn't 413. + app.config["MAX_CONTENT_LENGTH"] = 1024 * 1024 * 1024 # 1 GB + app.config["MAX_FORM_MEMORY_SIZE"] = 1024 * 1024 * 1024 # 1 GB for bp in all_blueprints(): app.register_blueprint(bp)