This worked in Uppy v1.8. I upgraded to 2.1 to fix other bugs and it stopped.
Adding file metadata in Uppy Core.
onBeforeFileAdded: (file, files) => {
file['meta']['pte_uid'] = pte_UUID();
file['meta']['pte_source'] = file.source;
return true;
}
Seems to work above but fails below even with the proper metadata in file in Uppy Transloadit. Can someone help with updated syntax in and around “fields” below? Thanks!
getAssemblyOptions (file) {
return {
params: {
auth: { key: 'xxxxxx' },
template_id: 'xxxxx'
},
fields: {
pte_uid: file.meta.pte_uid,
pte_source: file.meta.pte_source,
pte_uppy_instance_id: file.meta.pte_uppy_instance_id
}
}
}