fix: need to merge tus metadata to file meta
This commit is contained in:
parent
90f14b63e5
commit
d1e059fd71
|
@ -98,8 +98,13 @@ export function useUppy({
|
||||||
const file = uppyInstance.current?.getFile(fileID) as UppyFile
|
const file = uppyInstance.current?.getFile(fileID) as UppyFile
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if (file.uploader === "tus") {
|
if (file.uploader === "tus") {
|
||||||
|
const options = await sdk.protocols!().get<S5Client>(PROTOCOL_S5).getSdk().getTusOptions(file.data as File)
|
||||||
uppyInstance.current?.setFileState(fileID, {
|
uppyInstance.current?.setFileState(fileID, {
|
||||||
tus: await sdk.protocols!().get<S5Client>(PROTOCOL_S5).getSdk().getTusOptions(file.data as File)
|
tus: options,
|
||||||
|
meta: {
|
||||||
|
...options.metadata,
|
||||||
|
...file.meta,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue