From c57fea80eb5006cb71c488f4dab23e28e6d54add Mon Sep 17 00:00:00 2001 From: enki Date: Wed, 27 Aug 2025 21:16:48 -0700 Subject: [PATCH] upload fix --- internal/web/static/upload.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/web/static/upload.js b/internal/web/static/upload.js index 142971d..a89edb3 100644 --- a/internal/web/static/upload.js +++ b/internal/web/static/upload.js @@ -306,7 +306,10 @@ class GatewayUI { // Set timeout (10 minutes for large files) xhr.timeout = 600000; - // Set headers + // Open connection FIRST + xhr.open(options.method || 'GET', url); + + // Set headers AFTER opening Object.entries(options.headers || {}).forEach(([key, value]) => { xhr.setRequestHeader(key, value); }); @@ -319,7 +322,6 @@ class GatewayUI { } // Send request - xhr.open(options.method || 'GET', url); xhr.send(options.body); }); }