Skip to content

Commit

Permalink
fix(core): Fix webhook binary data max size configuration
Browse files Browse the repository at this point in the history
Webhook binary data max size was made configurable in #10857. Unfortunately that
had a mistake in its logic. Formidable takes the max file size in bytes, not in MBs.
  • Loading branch information
tomi committed Sep 20, 2024
1 parent 48294e7 commit 6ae57d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/webhooks/webhook-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export async function executeWebhook(
const form = formidable({
multiples: true,
encoding: encoding as formidable.BufferEncoding,
maxFileSize: formDataFileSizeMax,
maxFileSize: formDataFileSizeMax * 1024 * 1024,
// TODO: pass a custom `fileWriteStreamHandler` to create binary data files directly
});
req.body = await new Promise((resolve) => {
Expand Down

0 comments on commit 6ae57d8

Please sign in to comment.