{"action":"created","issue":{"url":"https://api.github.com/repos/burt202/lite-uploader/issues/20","labels_url":"https://api.github.com/repos/burt202/lite-uploader/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/burt202/lite-uploader/issues/20/comments","events_url":"https://api.github.com/repos/burt202/lite-uploader/issues/20/events","html_url":"https://github.com/burt202/lite-uploader/pull/20","id":120406420,"number":20,"title":"Properly iterate through file list","user":{"login":"Zmetser","id":146828,"avatar_url":"https://avatars.githubusercontent.com/u/146828?v=3","gravatar_id":"","url":"https://api.github.com/users/Zmetser","html_url":"https://github.com/Zmetser","followers_url":"https://api.github.com/users/Zmetser/followers","following_url":"https://api.github.com/users/Zmetser/following{/other_user}","gists_url":"https://api.github.com/users/Zmetser/gists{/gist_id}","starred_url":"https://api.github.com/users/Zmetser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zmetser/subscriptions","organizations_url":"https://api.github.com/users/Zmetser/orgs","repos_url":"https://api.github.com/users/Zmetser/repos","events_url":"https://api.github.com/users/Zmetser/events{/privacy}","received_events_url":"https://api.github.com/users/Zmetser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-04T13:56:37Z","updated_at":"2015-12-04T14:25:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/burt202/lite-uploader/pulls/20","html_url":"https://github.com/burt202/lite-uploader/pull/20","diff_url":"https://github.com/burt202/lite-uploader/pull/20.diff","patch_url":"https://github.com/burt202/lite-uploader/pull/20.patch"},"body":"FileList has the length attribute which is returned by some Object.keys implementation. Mobile safari for instance.\r\n\r\n```javascript\r\n> Object.keys(files)\r\n< [\"0\", \"length\"]\r\n```\r\n\r\nSince length is a valid key `_findErrorsForFile` will try validate it as a file and throw an Error preventing file upload.\r\n\r\nI changed the FileList iterator to the (mdn recommendation)[https://developer.mozilla.org/en/docs/Web/API/FileList] without using the `FileList.item` to access the files. This will still allow the clients of the plugin to swap the `getFiles` implementation."},"comment":{"url":"https://api.github.com/repos/burt202/lite-uploader/issues/comments/161979643","html_url":"https://github.com/burt202/lite-uploader/pull/20#issuecomment-161979643","issue_url":"https://api.github.com/repos/burt202/lite-uploader/issues/20","id":161979643,"user":{"login":"burt202","id":1516346,"avatar_url":"https://avatars.githubusercontent.com/u/1516346?v=3","gravatar_id":"","url":"https://api.github.com/users/burt202","html_url":"https://github.com/burt202","followers_url":"https://api.github.com/users/burt202/followers","following_url":"https://api.github.com/users/burt202/following{/other_user}","gists_url":"https://api.github.com/users/burt202/gists{/gist_id}","starred_url":"https://api.github.com/users/burt202/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burt202/subscriptions","organizations_url":"https://api.github.com/users/burt202/orgs","repos_url":"https://api.github.com/users/burt202/repos","events_url":"https://api.github.com/users/burt202/events{/privacy}","received_events_url":"https://api.github.com/users/burt202/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T14:25:26Z","updated_at":"2015-12-04T14:25:26Z","body":"Coo. Good spot. Could you write a unit test for this scenario, then I'll merge ASAP? Cheers"}}