SetFileMeta params not available to AddFile event
See original GitHub issueManually adding files as I’m using an HTML5 drag and drop:
const id = ulid()
const fileId = uppy.addFile({
name: `${d}|${file.name}`,
type: file.type,
data: file,
source: "Local",
isRemote: false,
})
uppy.setFileState(fileId, {
//uploadURL: "http://localhost:3100/upload",
progress: { uploadComplete: false, uploadStarted: false },
})
uppy.setFileMeta(fileId, {
fileId: id,
fileuuid: fileId,
})
Elsewhere in my code:
useEffectOnce(() => {
uppy.setMeta({
parentId: parentId,
sessionId: "",
userId: userId,
})
uppy.on("files-added", (result) => {
const item = result[0]
console.log(result)
Issue.
I’m expecting both fileId and fileuuid to be present in meta, from the addfile event.
[
{
"source": "Local",
"id": "uppy-1629121491/exif/image1/jpg-3s-2v-1e-image/jpeg-114913-1567870171799",
"name": "1629121491|exif_image1.jpg",
"extension": "jpg",
"meta": {
"parentId": null,
"sessionId": "",
"userId": "01EZ09H2T2GM33MA13XH96NVSG",
"name": "1629121491|exif_image1.jpg",
"type": "image/jpeg"
},
"type": "image/jpeg",
"data": {
"filepath": "exif_image1.jpg"
},
"progress": {
"percentage": 0,
"bytesUploaded": 0,
"bytesTotal": 114913,
"uploadComplete": false,
"uploadStarted": null
},
"size": 114913,
"isRemote": false,
"remote": ""
}
]
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
const - Uppy
For files that are imported from remote providers, the file data is not available in the browser. file.progress. An object with upload progress...
Read more >setFileMeta not passing params after upgrade #2240 - GitHub
I am not sure but since it appears to happen with recent aws-s3 versions, I think we may be working with an outdated...
Read more >Sending additional parameter with dropzone.js - Stack Overflow
the params option is what i found to send additional data with dropzone. the params option parametes are received in $_POST and uploaded...
Read more >BeamBkgHitRateMonitorModule Class Reference
Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.
Read more >backend/public/plugins/uppy/website/src/docs/uppy.md
addFile attempts to determine file type by magic bytes + the provided type + extension; then checks if the file can be added, ......
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
@arturi do you know if certain methods cancel each other out? Or if something else is going on here?
Thanks for posting the update. I’m going to close this as it’s seems to be an implementation issue on your side in combination with React. If you still think this is a genuine bug, feel free to elaborate again and we may reopen.