{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/9476","repository_url":"https://api.github.com/repos/cakephp/cakephp","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/9476/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/9476/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/9476/events","html_url":"https://github.com/cakephp/cakephp/issues/9476","id":177635226,"number":9476,"title":"Upload files with utf8 names","user":{"login":"AliFarhoudi","id":7499683,"avatar_url":"https://avatars.githubusercontent.com/u/7499683?v=3","gravatar_id":"","url":"https://api.github.com/users/AliFarhoudi","html_url":"https://github.com/AliFarhoudi","followers_url":"https://api.github.com/users/AliFarhoudi/followers","following_url":"https://api.github.com/users/AliFarhoudi/following{/other_user}","gists_url":"https://api.github.com/users/AliFarhoudi/gists{/gist_id}","starred_url":"https://api.github.com/users/AliFarhoudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliFarhoudi/subscriptions","organizations_url":"https://api.github.com/users/AliFarhoudi/orgs","repos_url":"https://api.github.com/users/AliFarhoudi/repos","events_url":"https://api.github.com/users/AliFarhoudi/events{/privacy}","received_events_url":"https://api.github.com/users/AliFarhoudi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Defect","name":"Defect","color":"f7c6c7"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/On%20hold","name":"On hold","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/102","html_url":"https://github.com/cakephp/cakephp/milestones/2.8.9","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/102/labels","id":2005628,"number":102,"title":"2.8.9","description":"Bugfixes and minor features for 2.8.x","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":2,"state":"open","created_at":"2016-09-15T01:53:06Z","updated_at":"2016-09-18T13:45:24Z","due_on":"2016-10-23T00:00:00Z","closed_at":null},"comments":5,"created_at":"2016-09-18T07:16:33Z","updated_at":"2016-09-18T14:35:41Z","closed_at":null,"body":"This is a (multiple allowed):\r\n* [x] bug\r\n* [ ] enhancement\r\n* [ ] feature-discussion (RFC)\r\n\r\n* CakePHP Version: 2.6.0.\r\n* Platform and Target: OS: Fedora 23, Web Server: Httpd (apache), DB: mysql  Ver 15.1 Distrib 10.0.25-MariaDB.\r\n\r\n### What you did\r\nUploaded a file with Persian (utf-8) filename. I had set a validation rule for mimetype.\r\n\r\n### Expected Behavior\r\nTo check mimetype and upload file.\r\n\r\n### Actual Behavior\r\nI got \"Can not determine the mimetype\" exception. I just traced the problem and figured out that Cake is using basename function to get filename and since this function has problem with utf8 filenames ([according to this](https://bugs.php.net/bug.php?id=62119)) and the filename is utf8 then the filename that this function returns is not correct.\r\nI didn't find any issue related."},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/247851231","html_url":"https://github.com/cakephp/cakephp/issues/9476#issuecomment-247851231","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/9476","id":247851231,"user":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?v=3","gravatar_id":"","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"created_at":"2016-09-18T14:35:41Z","updated_at":"2016-09-18T14:35:41Z","body":"> Wrong filename is being assigned in constructor method of File class (name attribute of File class).\r\n\r\nSo it seems the problem has nothing to with mimetype validator but `File` class. Mimetype validator doesn't use `File` class, it's some other code in your app which does."}}
{"actor":{"display_login":"ADmad"}}