{"action":"created","issue":{"url":"https://api.github.com/repos/mzabriskie/axios/issues/710","repository_url":"https://api.github.com/repos/mzabriskie/axios","labels_url":"https://api.github.com/repos/mzabriskie/axios/issues/710/labels{/name}","comments_url":"https://api.github.com/repos/mzabriskie/axios/issues/710/comments","events_url":"https://api.github.com/repos/mzabriskie/axios/issues/710/events","html_url":"https://github.com/mzabriskie/axios/issues/710","id":207742739,"number":710,"title":"How to upload images with axios","user":{"login":"Rigorbb","id":5402603,"avatar_url":"https://avatars0.githubusercontent.com/u/5402603?v=4","gravatar_id":"","url":"https://api.github.com/users/Rigorbb","html_url":"https://github.com/Rigorbb","followers_url":"https://api.github.com/users/Rigorbb/followers","following_url":"https://api.github.com/users/Rigorbb/following{/other_user}","gists_url":"https://api.github.com/users/Rigorbb/gists{/gist_id}","starred_url":"https://api.github.com/users/Rigorbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rigorbb/subscriptions","organizations_url":"https://api.github.com/users/Rigorbb/orgs","repos_url":"https://api.github.com/users/Rigorbb/repos","events_url":"https://api.github.com/users/Rigorbb/events{/privacy}","received_events_url":"https://api.github.com/users/Rigorbb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-02-15T08:57:38Z","updated_at":"2017-09-18T09:08:33Z","closed_at":"2017-02-15T09:14:07Z","author_association":"NONE","body":"I am trying to upload images in this code\r\n\r\n```\r\nlet data = new FormData();\r\n\r\n        for (var i = 0; i < files.length; i++) {\r\n            let file = files.item(i);\r\n            data.append('images[' + i + ']', file, file.name);\r\n        }\r\n\r\n        const config = {\r\n            headers: { 'content-type': 'multipart/form-data' }\r\n        }\r\n\r\n        return axios.post('/api/images', data, config)\r\n```\r\n\r\nRequest payload in chrome looks like this\r\n\r\n```\r\n------WebKitFormBoundarymm5rBWw14G5kJSX2\r\nContent-Disposition: form-data; name=\"images[0]\"; filename=\"15-08-22 113.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundarymm5rBWw14G5kJSX2--\r\n```\r\n\r\nBut the server receives an empty array of files. Why?"},"comment":{"url":"https://api.github.com/repos/mzabriskie/axios/issues/comments/330164930","html_url":"https://github.com/mzabriskie/axios/issues/710#issuecomment-330164930","issue_url":"https://api.github.com/repos/mzabriskie/axios/issues/710","id":330164930,"user":{"login":"Rigorbb","id":5402603,"avatar_url":"https://avatars0.githubusercontent.com/u/5402603?v=4","gravatar_id":"","url":"https://api.github.com/users/Rigorbb","html_url":"https://github.com/Rigorbb","followers_url":"https://api.github.com/users/Rigorbb/followers","following_url":"https://api.github.com/users/Rigorbb/following{/other_user}","gists_url":"https://api.github.com/users/Rigorbb/gists{/gist_id}","starred_url":"https://api.github.com/users/Rigorbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rigorbb/subscriptions","organizations_url":"https://api.github.com/users/Rigorbb/orgs","repos_url":"https://api.github.com/users/Rigorbb/repos","events_url":"https://api.github.com/users/Rigorbb/events{/privacy}","received_events_url":"https://api.github.com/users/Rigorbb/received_events","type":"User","site_admin":false},"created_at":"2017-09-18T09:08:32Z","updated_at":"2017-09-18T09:08:32Z","author_association":"NONE","body":"@JoelChacon \r\nmax_post_size in php.ini"}}
{"actor":{"display_login":"Rigorbb"}}