From af77ce406adb4bbcd379982c97ad6632bc822049 Mon Sep 17 00:00:00 2001 From: Bartosz Herba Date: Fri, 22 Nov 2024 13:43:10 +0100 Subject: [PATCH] feat: add form data handler in the sdk middleware module --- docs/content/3.middleware/2.guides/2.getting-started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/content/3.middleware/2.guides/2.getting-started.md b/docs/content/3.middleware/2.guides/2.getting-started.md index 3280072874..2ad8387130 100644 --- a/docs/content/3.middleware/2.guides/2.getting-started.md +++ b/docs/content/3.middleware/2.guides/2.getting-started.md @@ -129,7 +129,7 @@ fileUpload: (req) => ({ Available options: -- `enabled`: Enable/disable file upload functionality (default: `true`) +- `enabled`: Enable/disable file upload functionality (default: `false`) - `maxFileSize`: Maximum file size in bytes (default: 5MB) // Maximum file size is limited to 10MB - `maxFiles`: Maximum number of files per upload (default: 5) - `allowedMimeTypes`: Array of allowed MIME types (default: `["image/*", "application/pdf"]`) @@ -148,6 +148,8 @@ export const upload = (context) => { }; ``` +For the performance reasons, file uploads are disabled by default. It is recommended to enable them only when needed and use headers to control file upload behavior. + You can also dynamically control file upload behavior on a per-request basis. This is particularly useful when you want to enable uploads only for specific scenarios, such as: - Authenticated requests