diff --git a/src/lib/elements/element_input_files_tbl.svelte b/src/lib/elements/element_input_files_tbl.svelte index 05400f74..c05155a0 100644 --- a/src/lib/elements/element_input_files_tbl.svelte +++ b/src/lib/elements/element_input_files_tbl.svelte @@ -215,6 +215,10 @@ async function process_file_list(file_list: FileList) { file_data['warning_message'] = warning_message; + // .ppt and .doc must be converted before upload — block, don't just warn + file_data['block_upload'] = + guessed_extension === 'ppt' || guessed_extension === 'doc'; + file_data['uploaded'] = null; file_data['uploaded_bytes'] = null; @@ -272,7 +276,8 @@ async function process_file_list(file_list: FileList) { // input_file_list_processed.push(file_data); } - file_list_status = 'ready'; + const has_blocked = processed_file_list.some((f) => f.block_upload); + file_list_status = has_blocked ? 'blocked_legacy' : 'ready'; console.log(processed_file_list); // return JSON.parse(JSON.stringify(processed_file_list)); @@ -361,6 +366,13 @@ run(() => { {/if} + {#if file_list_status == 'blocked_legacy'} +