setFileMeta not passing params after upgrade
See original GitHub issueThe code works in our app using the following:
"@uppy/aws-s3": "1.5.2",
"@uppy/core": "1.8.2",
"@uppy/dashboard": "1.6.2",
"@uppy/drag-drop": "1.4.5",
"@uppy/react": "1.4.5",
"@uppy/status-bar": "1.5.2",
Application Code:
const uppy = Uppy({
debug: false,
})
.use(UppyDashboard, {
trigger: `.upload-item-${taskListItem.id}-files`,
showProgressDetails: true,
})
.use(AwsS3, {
getUploadParameters(file){
const attachment = {
attachable_id: taskListItem.id,
attachable_type: 'TaskListItem',
attachment_type: 'deliverable-change',
content_type: file.type,
file_name: file.name,
}
const requestOptions = {
presign_url_only: true,
}
return createAttachment(attachment, requestOptions).then((result) => {
const { data, id } = result
const { presigned_url } = data || {}
// Store the attachment ID in meta data so we can update later
uppy.setFileMeta(file.id, { attachmentId: id })
return {
method: 'PUT',
url: presigned_url,
fields: [],
}
})
},
})
.on('upload-success', (file) => {
const {
meta: { attachmentId },
name,
size,
type,
} = file
if (attachmentId){
const updated = {
id: attachmentId,
file_file_name: name,
file_content_type: type,
file_file_size: size,
}
updateAttachment(updated, { include_attachment_file: true })
}
})
When we upgrade to:
"@uppy/aws-s3": "^1.6.2",
"@uppy/core": "^1.10.2",
"@uppy/dashboard": "^1.8.3",
"@uppy/drag-drop": "^1.4.10",
"@uppy/react": "^1.6.3",
"@uppy/status-bar": "^1.6.3",
The file meta data (attachmentId) is no longer present.
We couldn’t find anything in the docs that mentioned a change in how this works.
Thanks in advance for your assistance!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to pass meta data using Uppy's Dashboard plugin
First of all need to change file.meta.id to file.id uppy.on('file-added', (file) =>{ console.log(file); uppy.setFileMeta(file.id, { test: ...
Read more >const - Uppy
This means several calls to .upload() , or a user adding more files after ... Note: no notification will be shown to the...
Read more >Custom meta data not returned in notify_url request despite ...
Hey guys; Even though I call setFileMeta when a file gets added ... via the “notify_url” parameter) does not include my custom meta...
Read more >Merge DICOM ToolkitTM V. 5.11.0 - IBM
This User's Manual is intended for developers of medical imaging applications who are using the Merge DICOM Toolkit to provide DICOM network or...
Read more >uppy - UNPKG
readyState) return;\n debug('changing transport and sending upgrade ... because there could be other\n // arguments passed either before or after the %c, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Think I found the cause: https://github.com/transloadit/uppy/pull/2276
Released in
@uppy/aws-s3
v1.6.5. Thanks!