Skip to content

Commit

Permalink
πŸ› remove fastify multipart fileSize limit
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlinagora committed May 29, 2024
1 parent cebd02a commit ef00dbd
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,13 @@ export default class WebServerService extends TdriveService<WebServerAPI> implem
this.server.register(sensible, {
errorHandler: false,
} as FastifyRegisterOptions<FastifyServerOptions>);
this.server.register(multipart);
this.server.register(multipart, {
throwFileSizeLimit: true,
limits: {
// note that null, undefined, 0 and -1 do not remove the default 1mg limit
fileSize: 500 * 1024 * 1024 * 1024 * 1024,
},
});
this.server.register(formbody);
this.server.register(corsPlugin, this.configuration.get<FastifyCorsOptions>("cors", {}));

Expand Down

0 comments on commit ef00dbd

Please sign in to comment.