Hi! Have been developing a Merge FileStorage integration for the startup I work at. I noticed the type for MergeFileStorageData is
export type MergeFileStorageData = { type?: FilePickerObjectType; id: string; name?: string; description?: string; // url to access the file/folder url?: string; // updated_at is a datetime string updatedAt?: string; // size in bytes size?: number; // for files they can have a mime type (essentially file_type) mime_type?: string; };,
but the data being passed into onSubmit passed into MergeFilePickerConfig consistently has the field 'outputType' set instead of 'type'.
example:
const mergeFilePickerConfig: FilePickerConfig = { onSubmit: (data) => { console.log({data}) void updateOrCreateMergeSource(data) }, // Type not exported types: ["DRIVE", "FOLDER", "FILE"] as FilePickerObjectType[], allowMultiSelect: true, }
output:
[ { "id": "xxx", "name": "...pdf", "size": 60855, "outputType": "FILE", .... } ]
with no 'type' field set.
Easy workaround to get stuff working on my end, just flagging to fix the type or the code that generates the object.
Thanks!
Hi! Have been developing a Merge FileStorage integration for the startup I work at. I noticed the type for MergeFileStorageData is
export type MergeFileStorageData = { type?: FilePickerObjectType; id: string; name?: string; description?: string; // url to access the file/folder url?: string; // updated_at is a datetime string updatedAt?: string; // size in bytes size?: number; // for files they can have a mime type (essentially file_type) mime_type?: string; };,but the data being passed into
onSubmitpassed intoMergeFilePickerConfigconsistently has the field 'outputType' set instead of 'type'.example:
const mergeFilePickerConfig: FilePickerConfig = { onSubmit: (data) => { console.log({data}) void updateOrCreateMergeSource(data) }, // Type not exported types: ["DRIVE", "FOLDER", "FILE"] as FilePickerObjectType[], allowMultiSelect: true, }output:
[ { "id": "xxx", "name": "...pdf", "size": 60855, "outputType": "FILE", .... } ]with no 'type' field set.
Easy workaround to get stuff working on my end, just flagging to fix the type or the code that generates the object.
Thanks!