{"action":"created","issue":{"url":"https://api.github.com/repos/Saluev/bootstrap-file-dialog/issues/4","labels_url":"https://api.github.com/repos/Saluev/bootstrap-file-dialog/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Saluev/bootstrap-file-dialog/issues/4/comments","events_url":"https://api.github.com/repos/Saluev/bootstrap-file-dialog/issues/4/events","html_url":"https://github.com/Saluev/bootstrap-file-dialog/issues/4","id":117713026,"number":4,"title":"Given `accept: \"image/*\"` it still takes other file types (e.g. PDF and plain text)","user":{"login":"drmuey","id":1204812,"avatar_url":"https://avatars.githubusercontent.com/u/1204812?v=3","gravatar_id":"","url":"https://api.github.com/users/drmuey","html_url":"https://github.com/drmuey","followers_url":"https://api.github.com/users/drmuey/followers","following_url":"https://api.github.com/users/drmuey/following{/other_user}","gists_url":"https://api.github.com/users/drmuey/gists{/gist_id}","starred_url":"https://api.github.com/users/drmuey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drmuey/subscriptions","organizations_url":"https://api.github.com/users/drmuey/orgs","repos_url":"https://api.github.com/users/drmuey/repos","events_url":"https://api.github.com/users/drmuey/events{/privacy}","received_events_url":"https://api.github.com/users/drmuey/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Saluev/bootstrap-file-dialog/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-19T00:23:47Z","updated_at":"2015-11-19T14:26:24Z","closed_at":null,"body":"Greetings!\r\n\r\nThanks for this nice plugin, its just what I needed!\r\n\r\nFound this isssue w/ this code:\r\n\r\n```\r\n$.FileDialog({\r\n    \"readAs\" : \"ArrayBuffer\",\r\n    \"accept\" : \"image/*\"\r\n})\r\n.on('files.bs.filedialog', function(ev) {\r\n…\r\n```\r\nI was assuming it'd error out or at least not continue on to the `.on('files.bs.filedialog')` function ;)"},"comment":{"url":"https://api.github.com/repos/Saluev/bootstrap-file-dialog/issues/comments/158072394","html_url":"https://github.com/Saluev/bootstrap-file-dialog/issues/4#issuecomment-158072394","issue_url":"https://api.github.com/repos/Saluev/bootstrap-file-dialog/issues/4","id":158072394,"user":{"login":"drmuey","id":1204812,"avatar_url":"https://avatars.githubusercontent.com/u/1204812?v=3","gravatar_id":"","url":"https://api.github.com/users/drmuey","html_url":"https://github.com/drmuey","followers_url":"https://api.github.com/users/drmuey/followers","following_url":"https://api.github.com/users/drmuey/following{/other_user}","gists_url":"https://api.github.com/users/drmuey/gists{/gist_id}","starred_url":"https://api.github.com/users/drmuey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drmuey/subscriptions","organizations_url":"https://api.github.com/users/drmuey/orgs","repos_url":"https://api.github.com/users/drmuey/repos","events_url":"https://api.github.com/users/drmuey/events{/privacy}","received_events_url":"https://api.github.com/users/drmuey/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T14:26:23Z","updated_at":"2015-11-19T14:26:23Z","body":"Instead of a comprehensive mime type check, I think the approach may need adjusted.\r\n\r\ne.g. ATM, it appears it passes 'accept' as the accept attr of the input it creates, allowing the browser to apply the 'accept' to input. The problem is that it has no effect. Maybe the input needs created differently or maybe the error from the browser does not bubble up to the dialog but those are 2 routes to look into without needing to do the mime check ourselves (either in the dialog or at upload time).\r\n\r\nWorst case, when a file gets added simply apply the 'accept' as a regex, if given, against the file's mime type and showing an error to that effect would be simple and extremely handy."}}