Skip to content

Commit

Permalink
fix: disable content type parsers on upload
Browse files Browse the repository at this point in the history
  • Loading branch information
fenos committed Jan 14, 2025
1 parent 53cd5d6 commit b3b1e35
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/http/routes/s3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ export default async function routes(fastify: FastifyInstance) {
(route) => route.disableContentTypeParser
)

if (disableContentParser) {
localFastify.addContentTypeParser(
['application/json', 'text/plain', 'application/xml'],
function (request, payload, done) {
done(null)
}
)
}

localFastify.register(fastifyMultipart, {
limits: {
fields: 20,
Expand Down

0 comments on commit b3b1e35

Please sign in to comment.