{"id":13779462,"url":"https://github.com/rferro/koa-body-clean","last_synced_at":"2025-07-15T01:06:50.759Z","repository":{"id":84180971,"uuid":"134429299","full_name":"rferro/koa-body-clean","owner":"rferro","description":"Koa middleware for auto cleanup files created to disk by koa-body, koa-better-body, koa-multer or any multipart middleware that populate ctx.*.files.","archived":false,"fork":false,"pushed_at":"2018-05-23T03:47:54.000Z","size":150,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T21:21:58.452Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/rferro.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}},"created_at":"2018-05-22T14:40:29.000Z","updated_at":"2022-05-25T13:37:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"68b71f17-faac-4a44-9c59-b9483561ae86","html_url":"https://github.com/rferro/koa-body-clean","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"67214b09e1c1a1a8fa2088a244c817d48e2e656c"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rferro%2Fkoa-body-clean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rferro%2Fkoa-body-clean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rferro%2Fkoa-body-clean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rferro%2Fkoa-body-clean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rferro","download_url":"https://codeload.github.com/rferro/koa-body-clean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248204879,"owners_count":21064937,"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-08-03T18:01:05.440Z","updated_at":"2025-04-12T01:41:11.514Z","avatar_url":"https://github.com/rferro.png","language":"JavaScript","funding_links":[],"categories":["Middleware"],"sub_categories":[],"readme":"\n# koa-body-clean\n\n[![node][node]][node-url]\n[![npm][npm]][npm-url]\n[![tests][tests]][tests-url]\n[![codecov][codecov]][codecov-url]\n[![deps][deps]][deps-url]\n[![ddeps][ddeps]][ddeps-url]\n[![standard][standard]][standard-url]\n\n\u003e [Koa](https://github.com/koajs/koa) middleware for auto cleanup files created to disk by:\n\n- [koa-body](https://github.com/dlau/koa-body)\n- [koa-better-body](https://github.com/tunnckoCore/koa-better-body)\n- [koa-multer](https://github.com/koa-modules/multer)\n- or any multipart middleware that populate `ctx.request.files`, `ctx.request.body.files` or `ctx.req.files`\n\nThe middleware will automatically remove any file in temporary location upon response end, throws or close.\n\nPlease report any issues!\n\n## Installation\n\nRequires:\n\n- node \u003e= `7.6.x`\n- koa \u003e= `2`\n\n```\n$ npm install koa-body-clean\n```\n\n## Usage\n\n```js\nconst bodyClean = require('koa-body-clean')\n```\n\n## Example\n\n```js\nconst body = require('koa-body') // or koa-better-body, koa-multer, ...\nconst bodyClean = require('koa-body-clean')\nconst Koa = require('koa')\n\nconst app = new Koa()\n\napp.use(body(bodyOptions))\napp.use(bodyClean())\n```\n\n## Skipping files\n\nTo skip a file from removal, set `skip` attribute to `true` in file object.\n\n## License\n\nMIT\n\n[npm]: https://img.shields.io/npm/v/koa-body-clean.svg?style=flat\n[npm-url]: https://npmjs.com/package/koa-body-clean\n\n[node]: https://img.shields.io/node/v/koa-body-clean.svg?style=flat\n[node-url]: https://nodejs.org\n\n[deps]: https://img.shields.io/david/rferro/koa-body-clean.svg?style=flat\n[deps-url]: https://david-dm.org/rferro/koa-body-clean\n\n[ddeps]: https://img.shields.io/david/dev/rferro/koa-body-clean.svg?style=flat\n[ddeps-url]: https://david-dm.org/rferro/koa-body-clean?type=dev\n\n[tests]: https://img.shields.io/travis/rferro/koa-body-clean.svg?style=flat\n[tests-url]: https://travis-ci.org/rferro/koa-body-clean\n\n[codecov]: https://coveralls.io/repos/github/rferro/koa-body-clean/badge.svg?branch=master\n[codecov-url]: https://coveralls.io/github/rferro/koa-body-clean?branch=master\n\n[standard]: https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat\n[standard-url]: https://standardjs.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frferro%2Fkoa-body-clean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frferro%2Fkoa-body-clean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frferro%2Fkoa-body-clean/lists"}