From 18cbe256deaee4233eafdf2551920c1fae4b81ba Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Wed, 22 Apr 2026 00:36:14 -0400 Subject: [PATCH] fix(pres_mgmt): increase file upload timeout to 20 min, guard null result - Set post_object timeout to 1200000ms (20 min) for hosted file uploads; the 90s default was killing large presentation file uploads - Guard result[0] access in .then() to prevent crash when upload times out or is aborted (TypeError: can't access property "hosted_file_id") Co-Authored-By: Claude Sonnet 4.6 --- src/routes/events/ae_comp__event_files_upload.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/routes/events/ae_comp__event_files_upload.svelte b/src/routes/events/ae_comp__event_files_upload.svelte index a5849607..1c5563a9 100644 --- a/src/routes/events/ae_comp__event_files_upload.svelte +++ b/src/routes/events/ae_comp__event_files_upload.svelte @@ -153,11 +153,16 @@ async function handle_input_upload_files({ api_cfg: $ae_api, endpoint: '/v3/action/hosted_file/upload', form_data: form_data, + timeout: 1200000, // 20 minutes — large presentation files can be very slow to upload task_id: task_id, log_lvl: log_lvl }) .then(async function (result) { // WARNING: endpoint returns a list, we sequentially handle one at a time. + if (!result || !result[0]) { + console.error('Upload failed or timed out — no result returned.'); + return false; + } const hosted_file_obj = result[0]; const hosted_file_id = hosted_file_obj.hosted_file_id;