Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure it has not already been reported
Fastify version
3.8.1
Plugin version
4.0.7
Node.js version
14.17.1
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Manjaro 21
Description
When upload a large file. the fields will be lost.
Steps to Reproduce
Here is the sample code:
const data = await req.file();
const fields = data.fields;
console.log(fields);
When upload a large file like:
curl -vF 'file=@BIG_FILE' -F 'name=n1' -F 'description=d1' -F 'tokenId=222' -F 'attributes=["v1","v2","v3"]' localhost:3000/
The output is:
<ref *1> {
file: {
fieldname: 'file',
filename: 'BIG_FILE.exe',
encoding: '7bit',
mimetype: 'application/octet-stream',
file: FileStream {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
truncated: false,
_read: [Function (anonymous)],
[Symbol(kCapture)]: false
},
fields: [Circular *1],
_buf: null,
toBuffer: [AsyncFunction: toBuffer]
}
}
There is only file
field, others like name
, description
lost.
Expected Behavior
No response
Metadata
Metadata
Assignees
Labels
No labels