-
-
Notifications
You must be signed in to change notification settings - Fork 106
docs: move data.fields line in README #320
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Fixes #252 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(available only AFTER the stream is consumed)
The above sentence is not always true. I do not want to give wrong explanation to the client just to reduce the issue.
Instead, I would like someone to explain more on how stream
or busboy
operate and create a Q&A section.
e.g.
busboy
consume the multipart
in serial order (stream), the order of form field is VERY IMPORTANT
to how fastify-multipart
can display the fields to you. We would recommend you to place the value fields first before any of the file fields. It can ensure your fields
will be accessible before start consuming any file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: if the file stream that is provided by data.file is not consumed, like in the example below with the usage of pump, the promise will not be fulfilled at the end of the multipart processing. This behavior is inherited from @fastify/busboy.
There is a note about this in the README.md
just after the example
I would suggest that you add another note with the explaining sentence proposed by @climba03003 instead.
Thank you for your explanations. I reverted to the original file and added the note of @climba03003 with a small addition:
I also realized that the following note was duplicated:
So I deleted the one that was in the wrong (imho) position. What do you think? |
On a related note, the documentation here https://github.com/fastify/busboy#busboy-special-events mentions that you can also just use |
I think it is a separate issue. |
Can you kindly help to check the sentence for us? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with code review suggestions applied.
Co-authored-by: Frazer Smith <frazer.dev@outlook.com>
Co-authored-by: Frazer Smith <frazer.dev@outlook.com>
Co-authored-by: Frazer Smith <frazer.dev@outlook.com>
@Fdawgs are you ok now? |
All gravy now |
Checklist
npm run test
andnpm run benchmark
and the Code of conduct