diff --git a/src/anthias_server/app/static/src/home.ts b/src/anthias_server/app/static/src/home.ts index 316d263d..77daff8c 100644 --- a/src/anthias_server/app/static/src/home.ts +++ b/src/anthias_server/app/static/src/home.ts @@ -223,13 +223,14 @@ function homeApp(): HomeAppData { }, // Multi-file upload (issue #3045). The server's assets_upload - // endpoint takes exactly one file per POST, so a multi-select - // batch is uploaded sequentially — one XHR per file — rather - // than via htmx's single-form submit. Driving it from JS (instead - // of hx-post on the
- {% comment %} The file tab is NOT htmx-managed. assets_upload takes - one file per POST, so a multi-select batch is uploaded - sequentially by uploadFiles() in home.ts (one XHR per file) — - htmx's single-form submit would only ever send the first file. - The action / enctype attributes stay so uploadFiles() can read - the endpoint URL off the form and the CSRF token off its input. + {% comment %} The file tab is NOT htmx-managed. assets_upload reads + one file per request (request.FILES.get('file_upload')), so a + single htmx form POST — even though it would carry every + selected file in the multipart body — would only ever get one + asset created. uploadFiles() in home.ts instead uploads the + batch sequentially, one XHR (one file) per request. The action + / enctype attributes stay so uploadFiles() can read the endpoint + URL off the form and the CSRF token off its input. {% endcomment %}