🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

formidable

Package Overview
Dependencies
Maintainers
5
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formidable - npm Package Compare versions

Comparing version

to
4.0.0-rc.3

2

package.json
{
"name": "formidable",
"version": "4.0.0-rc.2",
"version": "4.0.0-rc.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "The oldest and most popular Node.js form parsing library, with support for multipart/form-data, file uploads, and more.",

@@ -126,10 +126,14 @@ # formidable@next

// considering the above `formidable`
await parseMultipartRequest(req, {
maxFileSize: 1 * 1024 * 1024 // 1mb, defaults to 100mb
maxFilenameSize: 1000, // defaults to 255
maxFileKeySize: 1000, // defaults to 255
maxFieldKeySize: 1000, // defaults to 255
}, async (part) => {
console.log('part:', part.toString());
});
await parseMultipartRequest(
req,
{
maxFileSize: 1 * 1024 * 1024, // 1mb, defaults to 100mb
maxFilenameSize: 1000, // defaults to 255
maxFileKeySize: 1000, // defaults to 255
maxFieldKeySize: 1000, // defaults to 255
},
async (part) => {
console.log('part:', part.toString());
},
);
} else {

@@ -140,2 +144,6 @@ res.writeHead(200, { 'Content-Type': 'text/plain' });

});
server.listen(3000, () => {
console.log('Server running at http://localhost:3000');
});
```

@@ -152,2 +160,5 @@

```ts
// Deno/Bun/Cloudflare
import { parseMultipartRequest } from 'formidable';
export default {

@@ -154,0 +165,0 @@ async fetch(req: Request) {