Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function fastifyMultipart (fastify, options, done) {
return
}

for await (const part of req.parts()) {
for await (const part of req.parts(req.routeOptions.config.multipart_options)) {
req.body = part.fields

if (part.file) {
Expand Down
4 changes: 4 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ declare module 'fastify' {
interface FastifyInstance {
multipartErrors: MultipartErrors;
}

interface FastifyContextConfig {
multipart_options?: Omit<BusboyConfig, 'headers'>
}
Copy link
Member

Choose a reason for hiding this comment

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

Please add a test for this type

Copy link
Author

Choose a reason for hiding this comment

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

Done

}

type FastifyMultipartPlugin = FastifyPluginCallback<
Expand Down