-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7af5555
commit c336dc9
Showing
8 changed files
with
58 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 1 addition & 8 deletions
9
packages/middleware/__tests__/integration/bootstrap/serverWithUpload.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
/** | ||
* Options for file upload middleware | ||
*/ | ||
export interface FileUploadOptions { | ||
/** | ||
* Whether file upload is enabled | ||
* @default true | ||
*/ | ||
enabled?: boolean; | ||
maxFileSize?: number; // in bytes | ||
/** | ||
* Maximum file size in bytes | ||
* @default 5MB | ||
*/ | ||
maxFileSize?: number; | ||
/** | ||
* Maximum number of files | ||
* @default 5 | ||
*/ | ||
maxFiles?: number; | ||
/** | ||
* Allowed MIME types | ||
* @default ["image/*", "application/pdf"] | ||
*/ | ||
allowedMimeTypes?: string[]; | ||
fieldNames?: string[]; // specific field names to accept | ||
/** | ||
* Specific field names to accept | ||
* @default [] | ||
*/ | ||
fieldNames?: string[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters