Skip to content

Commit

Permalink
feat: add form data handler in the sdk middleware module
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszherba committed Nov 23, 2024
1 parent 4f6b4fc commit af77ce4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/content/3.middleware/2.guides/2.getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"]`)
Expand All @@ -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
Expand Down

0 comments on commit af77ce4

Please sign in to comment.