{"id":16834719,"url":"https://github.com/mscdex/connect-busboy","last_synced_at":"2025-04-04T19:13:39.201Z","repository":{"id":10489472,"uuid":"12670059","full_name":"mscdex/connect-busboy","owner":"mscdex","description":"Connect middleware for busboy","archived":false,"fork":false,"pushed_at":"2024-01-03T14:11:15.000Z","size":11,"stargazers_count":155,"open_issues_count":0,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-14T12:07:32.252Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mscdex.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":"2013-09-07T19:10:46.000Z","updated_at":"2024-01-07T19:13:46.000Z","dependencies_parsed_at":"2024-06-18T12:37:01.917Z","dependency_job_id":"b0e36739-cce3-4722-9e6d-595b198f83ff","html_url":"https://github.com/mscdex/connect-busboy","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":0.08333333333333337,"last_synced_commit":"579d0db8b47ee9812c756383eb5774e9096caa5b"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscdex%2Fconnect-busboy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscdex%2Fconnect-busboy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscdex%2Fconnect-busboy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscdex%2Fconnect-busboy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mscdex","download_url":"https://codeload.github.com/mscdex/connect-busboy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234923,"owners_count":20905854,"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":[],"created_at":"2024-10-13T12:07:33.914Z","updated_at":"2025-04-04T19:13:39.183Z","avatar_url":"https://github.com/mscdex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Description\n===========\n\nConnect middleware for [busboy](https://github.com/mscdex/busboy).\n\n\nRequirements\n============\n\n* [node.js](http://nodejs.org/) -- v10.16.0 or newer\n\n\nInstall\n============\n\n    npm install connect-busboy\n\n\nExample\n=======\n\n```js\nconst busboy = require('connect-busboy');\n\n// Default options, no immediate parsing\napp.use(busboy());\n// ...\napp.use((req, res) =\u003e {\n  if (req.busboy) {\n    req.busboy.on('file', (name, file, info) =\u003e {\n      // ...\n    });\n    req.busboy.on('field', (name, value, info) =\u003e {\n      // ...\n    });\n    req.pipe(req.busboy);\n  }\n  // etc ...\n});\n\n// Default options, immediately start reading from the request stream and\n// parsing\napp.use(busboy({ immediate: true }));\n// ...\napp.use((req, res) =\u003e {\n  if (req.busboy) {\n    req.busboy.on('file', (name, file, info) =\u003e {\n      // ...\n    });\n    req.busboy.on('field', (name, value, info) =\u003e {\n      // ...\n    });\n  }\n  // etc ...\n});\n\n// Any valid Busboy options can be passed in also\napp.use(busboy({\n  highWaterMark: 2 * 1024 * 1024,\n  limits: {\n    fileSize: 10 * 1024 * 1024,\n  }\n}));\n\n```\n\n## Troubleshooting\n\n### 'TypeError: Cannot call method 'on' of undefined'\n\nIf you find that `req.busboy` is not defined in your code when you expect it to be, check that the following conditions are met. If they are not, `req.busboy` won't be defined:\n\n 1. The request method is not GET or HEAD\n 2. The Content-Type header specifies  that is \"application/x-www-formurlencoded\" or starts with \"multipart/*\"\n 3. The Content-Length header is defined or chunked transfer encoding is in use. *This criteria should be met by all well-behaved HTTP clients and is unlikely the problem*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscdex%2Fconnect-busboy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmscdex%2Fconnect-busboy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscdex%2Fconnect-busboy/lists"}