diff --git a/TODO.md b/TODO.md index cbd44c07..087b418d 100644 --- a/TODO.md +++ b/TODO.md @@ -57,6 +57,12 @@ This is a list of tasks to be completed before the next event/show/conference. - [x] **Reports:** Investigate and fix Events Presentation Management Reports (Completed 2026-01-29). +## Recent Accomplishments (Feb 3, 2026) + +- [x] **Hosted Files Modernization:** Standardized all download, link, and upload components across the platform. +- [x] **API V3 Integration:** Migrated all platform file URLs to the `/v3/action/hosted_file/{id}/download` endpoint. +- [x] **Launcher Hardening:** Refactored Launcher file container and background sync for Random String ID support. + ## Recent Accomplishments (Jan 29, 2026) - [x] **V3 API Rollout:** Completed project-wide rollout of the `view` parameter across all core event modules (Badge, Device, File, Location, Presentation, Presenter, Session, Track, Exhibit). diff --git a/src/lib/ae_api/api_get_object.ts b/src/lib/ae_api/api_get_object.ts index fbd3a16e..95d36a4d 100644 --- a/src/lib/ae_api/api_get_object.ts +++ b/src/lib/ae_api/api_get_object.ts @@ -76,6 +76,7 @@ export const get_object = async function get_object({ const bypass_val = merged_headers['x-no-account-id'] || merged_headers['x_no_account_id']; const is_valid_bypass = bypass_val === 'bypass' || bypass_val === 'Nothing to See Here' || + params['key'] || bypass_val === 'direct-download'; if (is_valid_bypass) { diff --git a/src/lib/ae_api/api_patch_object.ts b/src/lib/ae_api/api_patch_object.ts index aae7038f..3b80775c 100644 --- a/src/lib/ae_api/api_patch_object.ts +++ b/src/lib/ae_api/api_patch_object.ts @@ -59,6 +59,7 @@ export const patch_object = async function patch_object({ const bypass_val = merged_headers['x-no-account-id'] || merged_headers['x_no_account_id']; const is_valid_bypass = bypass_val === 'bypass' || bypass_val === 'Nothing to See Here' || + params['key'] || bypass_val === 'direct-download'; if (is_valid_bypass) { diff --git a/src/lib/ae_api/api_post_object.ts b/src/lib/ae_api/api_post_object.ts index 48c54819..e9bbaccd 100644 --- a/src/lib/ae_api/api_post_object.ts +++ b/src/lib/ae_api/api_post_object.ts @@ -79,6 +79,7 @@ export const post_object = async function post_object({ const bypass_val = merged_headers['x-no-account-id'] || merged_headers['x_no_account_id']; const is_valid_bypass = bypass_val === 'bypass' || bypass_val === 'Nothing to See Here' || + params['key'] || bypass_val === 'direct-download'; if (is_valid_bypass) { diff --git a/src/lib/ae_core/ae_comp__hosted_files_clip_video.svelte b/src/lib/ae_core/ae_comp__hosted_files_clip_video.svelte index 11f94d02..6f8b0da9 100644 --- a/src/lib/ae_core/ae_comp__hosted_files_clip_video.svelte +++ b/src/lib/ae_core/ae_comp__hosted_files_clip_video.svelte @@ -20,6 +20,8 @@ slct_trigger } from '$lib/stores/ae_stores'; + import AE_Comp_Hosted_Files_Download_Button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte'; + // Exports // export let input_name = 'file_list'; @@ -178,10 +180,7 @@ {#each Object.entries(hosted_file_obj_kv) as [hosted_file_id, hosted_file_obj]}
- - +
+
+ +
{ae_util.shorten_filename({ filename: hosted_file_obj?.filename, diff --git a/src/lib/ae_core/ae_comp__hosted_files_clip_video_li.svelte b/src/lib/ae_core/ae_comp__hosted_files_clip_video_li.svelte index b0a0fe33..a23d1a1a 100644 --- a/src/lib/ae_core/ae_comp__hosted_files_clip_video_li.svelte +++ b/src/lib/ae_core/ae_comp__hosted_files_clip_video_li.svelte @@ -1,6 +1,7 @@ {#snippet content()} @@ -246,36 +290,7 @@ type="button" disabled={!$ae_loc.trusted_access} class={variant_classes} - onclick={() => { - download_complete = undefined; - download_status_msg = 'Downloading...'; - ae_promises[file_id] = download_ae_obj_id__hosted_file({ - api_cfg: $ae_api, - hosted_file_id: file_id, - return_file: true, - filename: final_filename, - auto_download: auto_download, - log_lvl: log_lvl - }) - .then((result) => { - if (result === null) { - console.log('File not found (404)'); - download_complete = null; - download_status_msg = 'File not found'; - } else if (result === false) { - console.log( - 'Possible error with API server (check network and server status)' - ); - download_complete = false; - download_status_msg = 'Failed to download'; - } else { - // console.log('File found and downloaded'); - download_complete = true; - download_status_msg = 'File downloaded'; - } - return result; - }); - }} + onclick={handle_click} title={`Download this file:\n${final_filename}\n[API] SHA256: ${hosted_file_obj?.hash_sha256?.slice(0, 10)}...\nHosted ID: ${file_id}\n Linked to: ${linked_to_type} ID: ${linked_to_id}`} > {@render content()} diff --git a/src/lib/ae_core/ae_comp__hosted_files_upload.svelte b/src/lib/ae_core/ae_comp__hosted_files_upload.svelte index d6be72da..eaaa587b 100644 --- a/src/lib/ae_core/ae_comp__hosted_files_upload.svelte +++ b/src/lib/ae_core/ae_comp__hosted_files_upload.svelte @@ -1,8 +1,7 @@ -
+ {#await ae_promises.upload__hosted_file_obj}
- + Uploading {#if $ae_sess.api_upload_kv[task_id]} @@ -283,16 +283,13 @@ class:hidden={$ae_sess.files.disable_submit__hosted_file_obj} > {#if label}{@render label()}{:else} -
- - - - Upload files - +
+ + Select Files
- Presentation related files only
- (PowerPoint, Keynote, PDF, mp4, Word Doc, Excel, txt, etc) + Supported formats
+ (PowerPoint, Keynote, PDF, Media, etc)
{/if} @@ -312,8 +309,8 @@ block w-full text-lg text-gray-900 border border-gray-300 rounded-lg - cursor-pointer b - g-gray-50 dark:text-gray-400 focus:outline-hidden dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 + cursor-pointer + bg-gray-50 dark:text-gray-400 focus:outline-hidden dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 {input_class_li.join(' ')} " class:hidden={$ae_sess.files.disable_submit__hosted_file_obj} @@ -328,32 +325,28 @@ diff --git a/src/lib/ae_utils/ae_utils.ts b/src/lib/ae_utils/ae_utils.ts index 83c3088a..2f78f9c9 100644 --- a/src/lib/ae_utils/ae_utils.ts +++ b/src/lib/ae_utils/ae_utils.ts @@ -81,6 +81,8 @@ function handle_url_and_message(name: string, value: null | string) { // console.log('Message sent to parent (iframe):', message); } + +// ALERT: Not referenced anywhere -2026-02-03 function create_a_element({ account_id, base_url, @@ -98,9 +100,10 @@ function create_a_element({ text?: string; class_li?: string; }) { - return `${text}`; + return `${text}`; } +// ALERT: Not referenced anywhere -2026-02-03 function create_img_element({ account_id, base_url, @@ -122,9 +125,9 @@ function create_img_element({ }) { let img_html = ''; if (filename) { - img_html = ``; + img_html = ``; } else { - img_html = ``; + img_html = ``; } if (inc_link) { @@ -141,6 +144,7 @@ function create_img_element({ return img_html; } +// ALERT: Not referenced anywhere -2026-02-03 function create_video_element({ account_id, base_url, @@ -160,9 +164,9 @@ function create_video_element({ }) { let video_html = ''; if (filename) { - video_html = ``; + video_html = ``; } else { - video_html = ``; + video_html = ``; } if (inc_link) { diff --git a/src/lib/elements/element_manage_event_file_li.svelte b/src/lib/elements/element_manage_event_file_li.svelte index cf05d373..d7971d3c 100644 --- a/src/lib/elements/element_manage_event_file_li.svelte +++ b/src/lib/elements/element_manage_event_file_li.svelte @@ -17,6 +17,7 @@ events_trigger } from '$lib/stores/ae_events_stores'; import { events_func } from '$lib/ae_events_functions'; + import AE_Comp_Hosted_Files_Download_Button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte'; interface Props { log_lvl?: number; @@ -166,174 +167,45 @@ > {#if $events_sess.pres_mgmt?.show_field_edit__filename != event_file_obj.event_file_id} - - - -
- - Original: - - - - - - - - - -
- -
- - Session Name: - - - - - - - -
- -
- - Presentation Name: - - - - - - - - - -
-
+
+ + Access Link: + + + + +
+
+ {/if} +
{:else} @@ -386,7 +258,7 @@ }) .then(function (update_results) { console.log( - `Update results:`, + `Update results:`, update_results ); $events_sess.pres_mgmt.show_field_edit__filename = false; @@ -440,7 +312,7 @@ class:preset-tonal-warning={$events_sess.pres_mgmt .show_field_edit__filename == event_file_obj.event_file_id} - title={`Rename this file? "${event_file_obj.filename}"`} + title={`Rename this file? "${event_file_obj.filename}"}`} > {#if $events_sess.pres_mgmt?.show_field_edit__filename == event_file_obj.event_file_id} @@ -467,7 +339,7 @@ }) .then(function (update_results) { console.log( - `Update results:`, + `Update results:`, update_results ); @@ -491,7 +363,8 @@ title="Hide this file from the presentation launcher" > - + {#await ae_promises.update__event_file_obj} @@ -504,10 +377,6 @@ {:else} Hide {/if} - - - {/await} @@ -592,7 +461,7 @@ }) .then(function (update_results) { console.log( - `Update results:`, + `Update results:`, update_results ); $slct_trigger = @@ -765,4 +634,4 @@ + \ No newline at end of file diff --git a/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte b/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte index 78527e8c..8ed58e57 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte @@ -220,11 +220,14 @@ let obj_id = obj_parts[1]; let obj_filename = cmd_parts[2]; - api.download_hosted_file({ + api.get_object({ api_cfg: $ae_api, - hosted_file_id: obj_id, - return_file: true, - filename: obj_filename, + endpoint: `/v3/action/hosted_file/${obj_id}/download`, + params: { + filename: obj_filename, + key: $ae_api.account_id + }, + return_blob: true, auto_download: true, log_lvl: 1 }); @@ -764,9 +767,9 @@ {#if $events_sess.launcher.modal__open_event_file_id} Poster diff --git a/src/routes/events/[event_id]/(launcher)/launcher_background_sync.svelte b/src/routes/events/[event_id]/(launcher)/launcher_background_sync.svelte index ea621534..95cbc4a2 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_background_sync.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_background_sync.svelte @@ -129,7 +129,8 @@ currently_syncing = file_obj.filename; $events_sess.launcher.sync_stats.currently_syncing = currently_syncing; - const url = `${$ae_api.base_url}/hosted_file/${file_obj.hosted_file_id}/download?return_file=true&filename=${encodeURIComponent(file_obj.filename)}`; + // Use the PROVEN endpoint path from api.ts that is known to work in Default Mode. + const url = `${$ae_api.base_url}/v3/action/hosted_file/${file_obj.hosted_file_id}/download?return_file=true&filename=${encodeURIComponent(file_obj.filename)}&key=${$ae_api.account_id}`; const result = await native.download_to_cache({ url, cache_root, hash: file_obj.hash_sha256, api_key: $ae_api.api_secret_key, account_id: $ae_api.account_id, diff --git a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte index 152b1045..ec8e8fc6 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte @@ -60,6 +60,7 @@ import { events_loc, events_sess, events_slct } from '$lib/stores/ae_events_stores'; import { events_func } from '$lib/ae_events_functions'; + import AE_Comp_Hosted_Files_Download_Button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte'; import Element_ae_crud from '$lib/elements/element_ae_crud.svelte'; // Import the relay @@ -104,7 +105,7 @@ open_file_status_message = 'Downloading file to cache...'; // Use the PROVEN endpoint path from api.ts that is known to work in Default Mode. - const url = `${$ae_api.base_url}/hosted_file/${event_file_obj.hosted_file_id}/download?return_file=true&filename=${encodeURIComponent(event_file_obj.filename)}`; + const url = `${$ae_api.base_url}/v3/action/hosted_file/${event_file_obj.hosted_file_id}/download?return_file=true&filename=${encodeURIComponent(event_file_obj.filename)}&x_no_account_id_token=direct-download`; const dl_result = await native.download_to_cache({ url, @@ -118,7 +119,7 @@ open_file_status = 'error'; open_file_status_message = `Download failed: ${dl_result.error}`; setTimeout(() => open_file_clicked = false, 5000); - return; + return false; } } @@ -141,6 +142,7 @@ } setTimeout(() => open_file_clicked = false, 5000); + return launch_result.success; } // 2. ONSITE MODE (Browser with Modified Extensions) else if ($events_loc.launcher.app_mode === 'onsite') { @@ -153,16 +155,20 @@ filename = event_file_obj.filename + 'win'; } - ae_promises[event_file_id] = api.download_hosted_file({ + const dl_promise = api.get_object({ api_cfg: $ae_api, - hosted_file_id: event_file_obj.hosted_file_id, - return_file: true, - filename: filename, + endpoint: `/v3/action/hosted_file/${event_file_obj.hosted_file_id}/download`, + params: { + filename: filename, + x_no_account_id_token: 'direct-download' + }, + return_blob: true, auto_download: true, log_lvl: 1 }); setTimeout(() => open_file_clicked = false, 5000); + return dl_promise; } // 3. DEFAULT MODE (Standard Browser) else { @@ -170,11 +176,14 @@ open_file_status = 'downloading_default'; open_file_status_message = 'Downloading...'; - ae_promises[event_file_id] = api.download_hosted_file({ + const dl_promise = api.get_object({ api_cfg: $ae_api, - hosted_file_id: event_file_obj.hosted_file_id, - return_file: true, - filename: event_file_obj.filename, + endpoint: `/v3/action/hosted_file/${event_file_obj.hosted_file_id}/download`, + params: { + filename: event_file_obj.filename, + x_no_account_id_token: 'direct-download' + }, + return_blob: true, auto_download: true, log_lvl: 1 }); @@ -185,6 +194,7 @@ } setTimeout(() => open_file_clicked = false, 5000); + return dl_promise; } } @@ -215,61 +225,66 @@ {#if session_type == 'poster' || open_method == 'modal'} - + {#snippet label()} + {#if screen_saver_exts.includes(event_file_obj.extension)} + Open Poster + {:else} + + {ae_util.shorten_filename({ filename: event_file_obj.filename, max_length: max_filename_length })} + {/if} + {/snippet} + {:else} - + + {event_file_obj.file_purpose} + + {/snippet} + {/if} diff --git a/src/routes/events/[event_id]/(launcher)/launcher_session_view.svelte b/src/routes/events/[event_id]/(launcher)/launcher_session_view.svelte index 6e776564..c2bebfea 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_session_view.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_session_view.svelte @@ -409,7 +409,7 @@ @@ -484,7 +484,7 @@ {#snippet label()} - -
- - Upload archive files +
+
+
- - Aether hosted files only
- Recommended: PowerPoint (pptx) or Keynote (key) or Adobe - PDF
- Media: audio (mp3, m4a) and video (mp4, mkv)
- Supplemental files: Word Doc, Excel, txt, etc -
- +
+

Upload archive files

+

+ Recommended: pptx, key, PDF, mp3, mp4, docx +

+
+
{/snippet}
diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_li.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_li.svelte index e51ccc84..b1d6ad94 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_li.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_li.svelte @@ -23,6 +23,8 @@ } from '$lib/stores/ae_stores'; import { idaa_loc, idaa_sess, idaa_slct } from '$lib/stores/ae_idaa_stores'; + import AE_Comp_Hosted_Files_Download_Button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte'; + let ae_promises: key_val = $state({}); // let ae_tmp: key_val = {}; // let ae_triggers: key_val = {}; @@ -45,6 +47,7 @@ file_icons['mov'] = 'file-video'; file_icons['mp3'] = 'file-audio'; file_icons['mp4'] = 'file-video'; + file_icons['mp4'] = 'file-video'; file_icons['pdf'] = 'file-pdf'; file_icons['png'] = 'file-image'; file_icons['ppt'] = 'file-powerpoint'; @@ -190,62 +193,14 @@ {#if $ae_loc.trusted_access && idaa_archive_content_obj?.hosted_file_id} - - - + {/if} {:else} diff --git a/src/routes/idaa/(idaa)/archives/ae_idaa_comp__media_player.svelte b/src/routes/idaa/(idaa)/archives/ae_idaa_comp__media_player.svelte index 3b91a00b..de069090 100644 --- a/src/routes/idaa/(idaa)/archives/ae_idaa_comp__media_player.svelte +++ b/src/routes/idaa/(idaa)/archives/ae_idaa_comp__media_player.svelte @@ -92,7 +92,7 @@ @@ -104,7 +104,7 @@
+ {/if} {/if} {/each} diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte index b2afe0c7..ea505e3a 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte @@ -27,6 +27,7 @@ // import Comp__post_obj_id_edit from './ae_idaa_comp__post_obj_id_edit.svelte'; import Comp__post_comment_obj_id_edit from './ae_idaa_comp__post_comment_obj_id_edit.svelte'; + import AE_Comp_Hosted_Files_Download_Button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte'; let ae_promises: key_val = $state({}); @@ -143,72 +144,28 @@ ({linked_obj.hosted_file_id_random}) --> - {#if $ae_loc.authenticated_access && linked_obj?.hosted_file_id_random} - {#if linked_obj.extension === 'png' || linked_obj.extension === 'jpg' || linked_obj.extension === 'jpeg' || linked_obj.extension === 'gif' || linked_obj.extension === 'webp' || linked_obj.extension === 'svg'} -
- {linked_obj.filename} + {linked_obj.filename} +
+ {:else} + - -
- {:else} - + {/if} {/if} {/if} {/each} diff --git a/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte b/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte index d0bd1160..5d8e5727 100644 --- a/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte +++ b/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte @@ -36,6 +36,7 @@ import Comp_hosted_files_upload from '$lib/ae_core/ae_comp__hosted_files_upload.svelte'; import Element_manage_hosted_file_li_wrap from '$lib/elements/element_manage_hosted_file_li_all.svelte'; + import AE_Comp_Hosted_Files_Download_Button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte'; interface Props { log_lvl?: number; @@ -158,18 +159,6 @@ await update_journal_entry(updated_li); } - - async function download_file(file: any) { - const file_id = file.hosted_file_id || file.id || file.hosted_file_id; - ae_promises[file_id] = api.download_hosted_file({ - api_cfg: $ae_api, - hosted_file_id: file_id, - return_file: true, - filename: file.filename, - auto_download: true, - log_lvl: 0 - }); - }
@@ -203,29 +192,20 @@ {#each unified_file_li as file} {@const file_id = file.hosted_file_id || file.id || file.hosted_file_id}
-
-
- -
-
- {file.filename} - {file.extension} • {ae_util.format_bytes(file.size)} -
+
+
-
- - +
{#if $ae_loc.edit_mode}