Skip to content

Commit 91b7aaa

Browse files
authored
docs: improve maxSize and maxFileSize in multipart.ts (#467)
1 parent bfd3920 commit 91b7aaa

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

multipart.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,19 @@ export interface FormDataReadOptions {
102102
*/
103103
customContentTypes?: Record<string, string>;
104104

105-
/** The maximum file size that can be handled. This defaults to 10MB when
106-
* not specified. This is to try to avoid DOS attacks where someone would
107-
* continue to try to send a "file" continuously until a host limit was
108-
* reached crashing the server or the host. */
105+
/** The maximum file size (in bytes) that can be handled. This defaults to
106+
* 10MB when not specified. This is to try to avoid DOS attacks where
107+
* someone would continue to try to send a "file" continuously until a host
108+
* limit was reached crashing the server or the host. Also see `maxSize`. */
109109
maxFileSize?: number;
110110

111-
/** The maximum size of a file to hold in memory, and not write to disk. This
112-
* defaults to `0`, so that all multipart form files are written to disk.
113-
* When set to a positive integer, if the form data file is smaller, it will
114-
* be retained in memory and available in the `.content` property of the
115-
* `FormDataFile` object. If the file exceeds the `maxSize` it will be
116-
* written to disk and the `.filename` property will contain the full path to
117-
* the output file. */
111+
/** The maximum size (in bytes) of a file to hold in memory, and not write
112+
* to disk. This defaults to `0`, so that all multipart form files are
113+
* written to disk. When set to a positive integer, if the form data file is
114+
* smaller, it will be retained in memory and available in the `.content`
115+
* property of the `FormDataFile` object. If the file exceeds the `maxSize`
116+
* it will be written to disk and the `.filename` property will contain the
117+
* full path to the output file. */
118118
maxSize?: number;
119119

120120
/** When writing form data files to disk, the output path. This will default

0 commit comments

Comments
 (0)