fix(control): add path creation before uploading

This commit is contained in:
E44
2026-01-17 13:10:12 +01:00
parent b5e997e675
commit 7632229704
2 changed files with 12 additions and 2 deletions
@@ -2,6 +2,7 @@ import { db } from './database';
import { get_display_by_id } from './stores/displays';
import {
get_current_folder_elements,
create_path_on_all_selected_displays,
get_file_by_id,
remove_all_files_without_display,
remove_file_from_display
@@ -28,6 +29,8 @@ export async function add_upload(
) {
if (file_list.length === 0) return console.warn('Upload canceled: no selected files');
await create_path_on_all_selected_displays(current_file_path, selected_display_ids);
const used_file_names: string[] = await (
await get_current_folder_elements(current_file_path, selected_display_ids)
).map((e) => e.name);