{"action":"created","issue":{"url":"https://api.github.com/repos/dlau/koa-body/issues/8","labels_url":"https://api.github.com/repos/dlau/koa-body/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/dlau/koa-body/issues/8/comments","events_url":"https://api.github.com/repos/dlau/koa-body/issues/8/events","html_url":"https://github.com/dlau/koa-body/issues/8","id":53991511,"number":8,"title":"how can i rename the upload file?","user":{"login":"monokeroslun","id":6500328,"avatar_url":"https://avatars.githubusercontent.com/u/6500328?v=3","gravatar_id":"","url":"https://api.github.com/users/monokeroslun","html_url":"https://github.com/monokeroslun","followers_url":"https://api.github.com/users/monokeroslun/followers","following_url":"https://api.github.com/users/monokeroslun/following{/other_user}","gists_url":"https://api.github.com/users/monokeroslun/gists{/gist_id}","starred_url":"https://api.github.com/users/monokeroslun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monokeroslun/subscriptions","organizations_url":"https://api.github.com/users/monokeroslun/orgs","repos_url":"https://api.github.com/users/monokeroslun/repos","events_url":"https://api.github.com/users/monokeroslun/events{/privacy}","received_events_url":"https://api.github.com/users/monokeroslun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-11T13:17:32Z","updated_at":"2015-01-11T16:25:41Z","closed_at":"2015-01-11T16:25:41Z","body":""},"comment":{"url":"https://api.github.com/repos/dlau/koa-body/issues/comments/69500122","html_url":"https://github.com/dlau/koa-body/issues/8#issuecomment-69500122","issue_url":"https://api.github.com/repos/dlau/koa-body/issues/8","id":69500122,"user":{"login":"dlau","id":2764274,"avatar_url":"https://avatars.githubusercontent.com/u/2764274?v=3","gravatar_id":"","url":"https://api.github.com/users/dlau","html_url":"https://github.com/dlau","followers_url":"https://api.github.com/users/dlau/followers","following_url":"https://api.github.com/users/dlau/following{/other_user}","gists_url":"https://api.github.com/users/dlau/gists{/gist_id}","starred_url":"https://api.github.com/users/dlau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlau/subscriptions","organizations_url":"https://api.github.com/users/dlau/orgs","repos_url":"https://api.github.com/users/dlau/repos","events_url":"https://api.github.com/users/dlau/events{/privacy}","received_events_url":"https://api.github.com/users/dlau/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T16:25:41Z","updated_at":"2015-01-11T16:25:41Z","body":"Short answer, you have to rename the file yourself. (thanks @tunnckoCore ) you wrote a response while I was typing! :+1: \r\n\r\nFirst instantiate the middleware with `multipart: true`\r\n```js\r\nvar body = require('koa-body')\r\napp.use(body({patchNode:true, patchKoa:true, multipart: true}));\r\n```\r\n\r\nIn your route handler, let's say you POST a file named `image`.\r\n\r\nYou will get a `this.request.body` object with a `files` key.\r\n\r\n```js\r\nvar route = function *(){\r\n  var file = this.request.body.files.image;\r\n\r\n  yield thunkify(fs.rename)(file.path, path.join(__dirname, './public/uploads/', file.name));\r\n\r\n  this.status = 200;\r\n  this.body = '/uploads/' + filename;\r\n};\r\n```\r\n\r\nSee [node-formidable Formidable.file](https://github.com/felixge/node-formidable#formidablefile)"}}