Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TS types #305

Merged
merged 2 commits into from
Dec 8, 2021
Merged

Fix TS types #305

merged 2 commits into from
Dec 8, 2021

Conversation

kibertoad
Copy link
Member

fixes #304

Checklist

@kibertoad
Copy link
Member Author

@climba03003 Technically busboy types are correct, it does need that parameter for functioning. However, fastify-multipart types were wrong, because we were not relying on user to pass that parameter, we were retrieving it from request directly.

*
* Modify this to handle e.g. Blobs.
*/
isPartAFile?: (fieldName: string | undefined, contentType: string | undefined, fileName: string | undefined) => boolean;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part of busboy types was missing

@climba03003
Copy link
Member

climba03003 commented Dec 8, 2021

@climba03003 Technically busboy types are correct, it does need that parameter for functioning. However, fastify-multipart types were wrong, because we were not relying on user to pass that parameter, we were retrieving it from request directly.

I will use Omit<BusboyConfig, 'headers'> as we handle headers already.
Partial also allow the users to pass the headers which may lead to the same problem again.

@kibertoad
Copy link
Member Author

@climba03003 Good point. Fixed.

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@rhadamez
Copy link

rhadamez commented Dec 8, 2021

You guys are too fast, thats how a real framework should happen. Thanks.

@kibertoad kibertoad merged commit dd15014 into master Dec 8, 2021
@kibertoad kibertoad deleted the fix/types branch December 8, 2021 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multipart: Boundary not found
3 participants