From 229c67c5f4ea16f69a1522071e9f5d5011ae1ae0 Mon Sep 17 00:00:00 2001 From: Tobias Tiederle Date: Thu, 26 Nov 2026 08:23:18 +0100 Subject: [PATCH] Send files from the asset upload step when creating an event The wizard stores selected files under values[option.id], but postNewEvent looked them up in values.metadata, so they were never added to the request. Fixes #1692 --- src/slices/eventSlice.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/slices/eventSlice.ts b/src/slices/eventSlice.ts index bf92c51e64..82e0e2bbc6 100644 --- a/src/slices/eventSlice.ts +++ b/src/slices/eventSlice.ts @@ -446,6 +446,8 @@ export const postNewEvent = (params: { location: string, uploadAssetsTrack?: UploadAssetsTrack[], metadata: { [key: string]: unknown }, + // Files chosen in the asset upload step are stored under their option id + [key: string]: unknown, }, metadataInfo: MetadataCatalog, extendedMetadata: MetadataCatalog[], @@ -591,12 +593,12 @@ export const postNewEvent = (params: { } for (let i = 0; uploadAssetOptions.length > i; i++) { if ( - !!values.metadata[uploadAssetOptions[i].id] && + values[uploadAssetOptions[i].id] instanceof File && values.sourceMode === "UPLOAD" ) { formData.append( uploadAssetOptions[i].id + ".0", - values.metadata[uploadAssetOptions[i].id] as File, + values[uploadAssetOptions[i].id] as File, ); assets.options = assets.options.concat(uploadAssetOptions[i]); }