From d1e059fd71e287273e90a59ec64e51406240654a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 18 Mar 2024 16:48:29 -0400 Subject: [PATCH] fix: need to merge tus metadata to file meta --- app/components/lib/uppy.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/components/lib/uppy.ts b/app/components/lib/uppy.ts index 3dc123c..d07ab95 100644 --- a/app/components/lib/uppy.ts +++ b/app/components/lib/uppy.ts @@ -98,8 +98,13 @@ export function useUppy({ const file = uppyInstance.current?.getFile(fileID) as UppyFile // @ts-ignore if (file.uploader === "tus") { + const options = await sdk.protocols!().get(PROTOCOL_S5).getSdk().getTusOptions(file.data as File) uppyInstance.current?.setFileState(fileID, { - tus: await sdk.protocols!().get(PROTOCOL_S5).getSdk().getTusOptions(file.data as File) + tus: options, + meta: { + ...options.metadata, + ...file.meta, + } }) } }