{"action":"created","issue":{"url":"https://api.github.com/repos/octobercms/october/issues/2115","repository_url":"https://api.github.com/repos/octobercms/october","labels_url":"https://api.github.com/repos/octobercms/october/issues/2115/labels{/name}","comments_url":"https://api.github.com/repos/octobercms/october/issues/2115/comments","events_url":"https://api.github.com/repos/octobercms/october/issues/2115/events","html_url":"https://github.com/octobercms/october/issues/2115","id":159824399,"number":2115,"title":"Problem with mimeTypes validation on fileupload widget","user":{"login":"hybridvision","id":11492432,"avatar_url":"https://avatars.githubusercontent.com/u/11492432?v=3","gravatar_id":"","url":"https://api.github.com/users/hybridvision","html_url":"https://github.com/hybridvision","followers_url":"https://api.github.com/users/hybridvision/followers","following_url":"https://api.github.com/users/hybridvision/following{/other_user}","gists_url":"https://api.github.com/users/hybridvision/gists{/gist_id}","starred_url":"https://api.github.com/users/hybridvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hybridvision/subscriptions","organizations_url":"https://api.github.com/users/hybridvision/orgs","repos_url":"https://api.github.com/users/hybridvision/repos","events_url":"https://api.github.com/users/hybridvision/events{/privacy}","received_events_url":"https://api.github.com/users/hybridvision/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-12T12:16:23Z","updated_at":"2016-06-12T20:22:06Z","closed_at":null,"body":"**Expected Behaviour**\r\n\r\nAccording to [the docs](https://octobercms.com/docs/backend/forms#widget-fileupload), we can set the accepted `mimeTypes` for the fileupload widget. Only these types should be accepted.\r\n\r\n**Actual Behaviour**\r\n\r\nAlthough I have set the mimeTypes to `image/jpeg, image/png, image/gif` it will not accept files of these types and I get the following error: \r\n\r\n![image](https://cloud.githubusercontent.com/assets/11492432/15991041/d1558292-30a6-11e6-86b1-a701ed92b8a1.png)\r\n\r\nI've confirmed with another tool that the files I'm trying to upload are the expected MIME type. I've tried with both JPEG and PNG files and the network inspector seems to show that this is the data type that is being transmitted.\r\n\r\n**Steps to reproduce**\r\n\r\n1) In the fields.yaml file, add a field like this:\r\n\r\n```\r\nslides:\r\n        label: Slides\r\n        type: fileupload\r\n        mimeTypes: image/jpeg, image/png, image/gif\r\n        mode: image\r\n```\r\n\r\n2) Try to upload a valid JPG/PNG/GIF file and see the error message.\r\n\r\n**OctoberCMS Build**\r\n\r\nI have build 345 (latest) but I also am seeing this on a much older installation running build 282."},"comment":{"url":"https://api.github.com/repos/octobercms/october/issues/comments/225458164","html_url":"https://github.com/octobercms/october/issues/2115#issuecomment-225458164","issue_url":"https://api.github.com/repos/octobercms/october/issues/2115","id":225458164,"user":{"login":"hybridvision","id":11492432,"avatar_url":"https://avatars.githubusercontent.com/u/11492432?v=3","gravatar_id":"","url":"https://api.github.com/users/hybridvision","html_url":"https://github.com/hybridvision","followers_url":"https://api.github.com/users/hybridvision/followers","following_url":"https://api.github.com/users/hybridvision/following{/other_user}","gists_url":"https://api.github.com/users/hybridvision/gists{/gist_id}","starred_url":"https://api.github.com/users/hybridvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hybridvision/subscriptions","organizations_url":"https://api.github.com/users/hybridvision/orgs","repos_url":"https://api.github.com/users/hybridvision/repos","events_url":"https://api.github.com/users/hybridvision/events{/privacy}","received_events_url":"https://api.github.com/users/hybridvision/received_events","type":"User","site_admin":false},"created_at":"2016-06-12T20:22:06Z","updated_at":"2016-06-12T20:22:06Z","body":"That works! Merci beaucoup @gabsource :)\r\n\r\nI find it a bit counter-intuitive to set a value like this for `mimeTypes` especially when there is also the `fileTypes` setting that seems more appropriate for values like that.\r\n\r\nMaybe an extra note can be added to the docs...\r\n\r\nAnyway, my problem is solved now! Merci encore!"}}
{"actor":{"display_login":"hybridvision"}}