{"action":"created","issue":{"url":"https://api.github.com/repos/react-component/upload/issues/96","repository_url":"https://api.github.com/repos/react-component/upload","labels_url":"https://api.github.com/repos/react-component/upload/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/react-component/upload/issues/96/comments","events_url":"https://api.github.com/repos/react-component/upload/issues/96/events","html_url":"https://github.com/react-component/upload/issues/96","id":258742117,"number":96,"title":"不能上传xls文件","user":{"login":"czhaoli","id":8766940,"avatar_url":"https://avatars3.githubusercontent.com/u/8766940?v=4","gravatar_id":"","url":"https://api.github.com/users/czhaoli","html_url":"https://github.com/czhaoli","followers_url":"https://api.github.com/users/czhaoli/followers","following_url":"https://api.github.com/users/czhaoli/following{/other_user}","gists_url":"https://api.github.com/users/czhaoli/gists{/gist_id}","starred_url":"https://api.github.com/users/czhaoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czhaoli/subscriptions","organizations_url":"https://api.github.com/users/czhaoli/orgs","repos_url":"https://api.github.com/users/czhaoli/repos","events_url":"https://api.github.com/users/czhaoli/events{/privacy}","received_events_url":"https://api.github.com/users/czhaoli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-09-19T08:47:51Z","updated_at":"2017-09-20T02:10:54Z","closed_at":null,"author_association":"NONE","body":"`\r\n因为你用了\r\n    if (!attrAccept(file, accept)) {\r\n      return;\r\n    }\r\n导致accept为application/vnd.ms-excel，不能上传xls文件\r\n`"},"comment":{"url":"https://api.github.com/repos/react-component/upload/issues/comments/330724777","html_url":"https://github.com/react-component/upload/issues/96#issuecomment-330724777","issue_url":"https://api.github.com/repos/react-component/upload/issues/96","id":330724777,"user":{"login":"czhaoli","id":8766940,"avatar_url":"https://avatars3.githubusercontent.com/u/8766940?v=4","gravatar_id":"","url":"https://api.github.com/users/czhaoli","html_url":"https://github.com/czhaoli","followers_url":"https://api.github.com/users/czhaoli/followers","following_url":"https://api.github.com/users/czhaoli/following{/other_user}","gists_url":"https://api.github.com/users/czhaoli/gists{/gist_id}","starred_url":"https://api.github.com/users/czhaoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czhaoli/subscriptions","organizations_url":"https://api.github.com/users/czhaoli/orgs","repos_url":"https://api.github.com/users/czhaoli/repos","events_url":"https://api.github.com/users/czhaoli/events{/privacy}","received_events_url":"https://api.github.com/users/czhaoli/received_events","type":"User","site_admin":false},"created_at":"2017-09-20T02:10:54Z","updated_at":"2017-09-20T02:10:54Z","author_association":"NONE","body":"2.4.0就可以，因为2.4.1作者用了 \r\n[import attrAccept from 'attr-accept'; ... if (!attrAccept(file, accept)) { return; }](https://github.com/react-component/upload/blob/c00f1bc9d1330dcca9c5be6af0a99bdbb669fc34/src/AjaxUploader.jsx#L117) 而attr-accept源码 [用file.type和accept的type做比较](https://github.com/okonet/attr-accept/blob/2847ab8c065ee41092f012c8a5b61e84263c815f/src/index.js#L21) 而.xls文件拿到的name.type是\"\"空字符串，所以和accept对比后返回false"}}
{"actor":{"display_login":"czhaoli"}}