From f6a65343804d2f8de986bc8a776f19f413c3d69d Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Wed, 11 Mar 2026 14:26:29 -0400 Subject: [PATCH] fix: restore /v3/action/hosted_file path now that endpoint exists in v3 router Co-Authored-By: Claude Sonnet 4.6 --- src/lib/elements/element_manage_event_file_li.svelte | 4 ++-- src/routes/events/ae_comp__event_file_obj_tbl.svelte | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/elements/element_manage_event_file_li.svelte b/src/lib/elements/element_manage_event_file_li.svelte index b213b2e7..61c5d3b7 100644 --- a/src/lib/elements/element_manage_event_file_li.svelte +++ b/src/lib/elements/element_manage_event_file_li.svelte @@ -80,7 +80,7 @@ // WHY: Poster sessions display files in the Launcher modal via tag — PDFs can't render there. // Presenters upload PDFs which must be converted server-side to high-res webp images. // Button is only shown in edit_mode for PDF files linked to a poster-type session. - // Backend: /hosted_file/{id}/convert_file runs pdf2image (3840px wide, first page only) + // Backend: /v3/action/hosted_file/{id}/convert_file runs pdf2image (3840px wide, first page only) // and saves the result as a new hosted_file record linked to the same parent object. type ConvertStatus = 'idle' | 'converting' | 'done' | 'error'; let convert_status_kv: Record = $state({}); @@ -98,7 +98,7 @@ || event_file_obj.event_presentation_id || event_file_obj.event_id; const filename_no_ext = (event_file_obj.filename ?? 'poster_image').replace(/\.pdf$/i, ''); - const url = `${$ae_api.base_url}/hosted_file/${event_file_obj.hosted_file_id}/convert_file` + const url = `${$ae_api.base_url}/v3/action/hosted_file/${event_file_obj.hosted_file_id}/convert_file` + `?link_to_type=${encodeURIComponent(link_to_type_val)}` + `&link_to_id=${encodeURIComponent(link_to_id_val)}` + `&filename_no_ext=${encodeURIComponent(filename_no_ext)}` diff --git a/src/routes/events/ae_comp__event_file_obj_tbl.svelte b/src/routes/events/ae_comp__event_file_obj_tbl.svelte index 825285cb..dc19c7ba 100644 --- a/src/routes/events/ae_comp__event_file_obj_tbl.svelte +++ b/src/routes/events/ae_comp__event_file_obj_tbl.svelte @@ -69,7 +69,7 @@ // WHY: Poster sessions display files in the Launcher modal via tag — PDFs can't render there. // Presenters upload PDFs which must be converted server-side to high-res webp images. // Button is only shown in edit_mode for PDF files linked to a poster-type session. - // Backend: /hosted_file/{id}/convert_file runs pdf2image (3840px wide, first page only) + // Backend: /v3/action/hosted_file/{id}/convert_file runs pdf2image (3840px wide, first page only) // and saves the result as a new hosted_file record linked to the same parent object. type ConvertStatus = 'idle' | 'converting' | 'done' | 'error'; let convert_status_kv: Record = $state({}); @@ -87,7 +87,7 @@ || event_file_obj.event_presentation_id || event_file_obj.event_id; const filename_no_ext = (event_file_obj.filename ?? 'poster_image').replace(/\.pdf$/i, ''); - const url = `${$ae_api.base_url}/hosted_file/${event_file_obj.hosted_file_id}/convert_file` + const url = `${$ae_api.base_url}/v3/action/hosted_file/${event_file_obj.hosted_file_id}/convert_file` + `?link_to_type=${encodeURIComponent(link_to_type)}` + `&link_to_id=${encodeURIComponent(link_to_id)}` + `&filename_no_ext=${encodeURIComponent(filename_no_ext)}`