{"id":25272863,"url":"https://github.com/socketbyte/express-multipart","last_synced_at":"2025-04-06T07:43:11.534Z","repository":{"id":90873433,"uuid":"361931354","full_name":"SocketByte/express-multipart","owner":"SocketByte","description":":zap: High performance lightweight Express middleware for handling multipart/form-data requests.","archived":false,"fork":false,"pushed_at":"2021-04-27T09:41:17.000Z","size":137,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T11:12:05.528Z","etag":null,"topics":["express","form-data","formdata","http","library","middleware","multipart","parser","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SocketByte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-27T00:26:25.000Z","updated_at":"2021-07-04T19:24:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6238ef2-c03a-4492-8e67-d9933fa22b80","html_url":"https://github.com/SocketByte/express-multipart","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"52914e24d425a5fb4b8a866fcbb1aae4db833e28"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketByte%2Fexpress-multipart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketByte%2Fexpress-multipart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketByte%2Fexpress-multipart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketByte%2Fexpress-multipart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SocketByte","download_url":"https://codeload.github.com/SocketByte/express-multipart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451615,"owners_count":20940946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","form-data","formdata","http","library","middleware","multipart","parser","typescript"],"created_at":"2025-02-12T13:28:24.666Z","updated_at":"2025-04-06T07:43:11.495Z","avatar_url":"https://github.com/SocketByte.png","language":"TypeScript","readme":"# express-multipart ⚡\n\nHigh performance lightweight Express middleware for handling `multipart/form-data` requests built with [Busboy](https://www.npmjs.com/package/busboy) 🔥\n\n## Features\n\n- Handling single and multiple files.\n- Persisting received files on a disk.\n- Multitude of fancy knobs to play with!\n- Built-in magic byte verification with [file-type](https://www.npmjs.com/package/file-type).\n- Easy integration with other file processing libraries.\n- Modern, clean and built natively with **TypeScript** 🐋\n\n## Quick Start\n\n### npm\n\n```\nnpm install express-multipart\n```\n\n### yarn\n\n```\nyarn add express-multipart\n```\n\n## Code example\n\n```typescript\nimport express from \"express\";\nimport multipart from \"express-multipart\";\n\n(async () =\u003e {\n  const app = express();\n\n  const mp = multipart({\n    preserveExtensions: true,\n    destination: \"./uploads\",\n  });\n\n  app.post(\"/upload\", mp.files(\"myfiles\", 2), (req, res) =\u003e {\n    const file1 = req.files[0];\n    const file2 = req.files[0];\n    res.send(\"😊\");\n  });\n\n  app.post(\"/single\", mp.file(\"myfile\"), (req, res) =\u003e {\n    const file = req.file;\n    res.send(\"😃\");\n  });\n\n  app.post(\"/onlytext\", mp.text(), (req, res) =\u003e {\n    const value = req.body.myfieldname;\n    res.send(\"😁\");\n  });\n\n  app.listen(3000, () =\u003e {\n    console.log(\"Express server running.\");\n  });\n})();\n```\n\nYou can find more information on the [official documentation](http://socketbyte.github.io/express-multipart).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketbyte%2Fexpress-multipart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketbyte%2Fexpress-multipart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketbyte%2Fexpress-multipart/lists"}