You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[![Make A Pull Request][prs-welcome-img]][prs-welcome-url]
27
27
28
-
This project is [semantically versioned](https://semver.org) and available as
28
+
This project is [semantically versioned](https://semver.org) and if you want support in migrating between versions you can schedule us for training or support us through donations, so we can prioritize.
29
+
30
+
> [!CAUTION]
31
+
> As of April 2025, old versions like v1 and v2 are still the most used, while they are deperecated for years -- they are also vulnerable to attacks if you are not implementing it properly. **Please upgrade!** We are here to help, and AI Editors & Agents could help a lot in such codemod-like migrations.
32
+
33
+
> [!TIP]
34
+
> If you are starting a fresh project, you can check out the `formidable-mini` which is a super minimal version of Formidable (not quite configurable yet, but when it does it could become the basis for `formidable@v4`), using web standards like FormData API and File API, and you can use it to stream uploads directly to S3 or other such services.
35
+
36
+
<!-- This project is [semantically versioned](https://semver.org) and available as
29
37
part of the [Tidelift Subscription][tidelift-url] for professional grade
_Check [VERSION NOTES](https://github.com/node-formidable/formidable/blob/master/VERSION_NOTES.md) for more information on v1, v2, and v3 plans, NPM dist-tags and branches._
52
+
> [!NOTE]
53
+
> Check [VERSION NOTES](https://github.com/node-formidable/formidable/blob/master/VERSION_NOTES.md) for more information on v1, v2, and v3 plans, NPM dist-tags and branches._
45
54
46
55
This module was initially developed by
47
56
[**@felixge**](https://github.com/felixge) for
@@ -70,9 +79,8 @@ rules, like enabling Two-Factor Auth in your npm and GitHub accounts.
70
79
71
80
This package is a dual ESM/commonjs package.
72
81
73
-
This project requires `Node.js >= 10.13`. Install it using
74
-
[yarn](https://yarnpkg.com) or [npm](https://npmjs.com).<br /> _We highly
75
-
recommend to use Yarn when you think to contribute to this project._
82
+
> [!NOTE]
83
+
> This project requires `Node.js >= 20`. Install it using [yarn](https://yarnpkg.com) or [npm](https://npmjs.com).<br /> _We highly recommend to use Yarn when you think to contribute to this project._
76
84
77
85
This is a low-level package, and if you're using a high-level framework it _may_
78
86
already be included. Check the examples below and the [examples/](https://github.com/node-formidable/formidable/tree/master/examples) folder.
@@ -425,12 +433,12 @@ multipart stream. Doing so will disable any `'field'` / `'file'` events
425
433
processing which would occur otherwise, making you fully responsible for
426
434
handling the processing.
427
435
428
-
About `uploadDir`, given the following directory structure
436
+
About `uploadDir`, given the following directory structure
429
437
```
430
438
project-name
431
439
├── src
432
440
│ └── server.js
433
-
│
441
+
│
434
442
└── uploads
435
443
└── image.jpg
436
444
```
@@ -620,7 +628,7 @@ export interface File {
620
628
621
629
// The name this file had according to the uploading client.
622
630
file.originalFilename:string|null;
623
-
631
+
624
632
// calculated based on options provided
625
633
file.newFilename:string|null;
626
634
@@ -670,7 +678,7 @@ file system.
670
678
671
679
```js
672
680
form.on('fileBegin', (formName, file) => {
673
-
// accessible here
681
+
// accessible here
674
682
// formName the name in the form (<input name="thisname" type="file">) or http filename for octetstream
675
683
// file.originalFilename http filename or null if there was a parsing error
676
684
// file.newFilename generated hexoid or what options.filename returned
0 commit comments