{"action":"created","issue":{"url":"https://api.github.com/repos/trippo/ResponsiveFilemanager/issues/525","repository_url":"https://api.github.com/repos/trippo/ResponsiveFilemanager","labels_url":"https://api.github.com/repos/trippo/ResponsiveFilemanager/issues/525/labels{/name}","comments_url":"https://api.github.com/repos/trippo/ResponsiveFilemanager/issues/525/comments","events_url":"https://api.github.com/repos/trippo/ResponsiveFilemanager/issues/525/events","html_url":"https://github.com/trippo/ResponsiveFilemanager/issues/525","id":387471073,"node_id":"MDU6SXNzdWUzODc0NzEwNzM=","number":525,"title":"Uploading picture bigger than chunk size 2mb","user":{"login":"bboy-space","id":5296748,"node_id":"MDQ6VXNlcjUyOTY3NDg=","avatar_url":"https://avatars1.githubusercontent.com/u/5296748?v=4","gravatar_id":"","url":"https://api.github.com/users/bboy-space","html_url":"https://github.com/bboy-space","followers_url":"https://api.github.com/users/bboy-space/followers","following_url":"https://api.github.com/users/bboy-space/following{/other_user}","gists_url":"https://api.github.com/users/bboy-space/gists{/gist_id}","starred_url":"https://api.github.com/users/bboy-space/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboy-space/subscriptions","organizations_url":"https://api.github.com/users/bboy-space/orgs","repos_url":"https://api.github.com/users/bboy-space/repos","events_url":"https://api.github.com/users/bboy-space/events{/privacy}","received_events_url":"https://api.github.com/users/bboy-space/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-12-04T20:42:11Z","updated_at":"2019-01-02T09:38:22Z","closed_at":null,"author_association":"NONE","body":"If I try to upload a picture requiring many chunk uploads (~2.10MB) , it fails even if the mime type is ok. \r\nI took that picture (~6MB) and reduce it down to 1.5MB, and the upload worked so it doesn't come from the picture itself.\r\nI thought it was an upload limitation in Apache so I increased it but it works in another APP running on the same server\r\n\r\nI finally digged into the code and found that it fails from the second Ajax (and all other after) in the file UploadHandler.php  line 383  when trying to do : \r\n\r\n`if (preg_match($this->options['image_file_types'], $file->name) && function_exists('exif_imagetype') && !@exif_imagetype($uploaded_file)) {`\r\n\r\nIndeed, i don't know why but the exif_imagetype function return false from the second chunk. \r\nI tried to remove this test and my picture was finally successfully uploaded.\r\n\r\nThanks for feedback on this\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/trippo/ResponsiveFilemanager/issues/comments/450819950","html_url":"https://github.com/trippo/ResponsiveFilemanager/issues/525#issuecomment-450819950","issue_url":"https://api.github.com/repos/trippo/ResponsiveFilemanager/issues/525","id":450819950,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDgxOTk1MA==","user":{"login":"bboy-space","id":5296748,"node_id":"MDQ6VXNlcjUyOTY3NDg=","avatar_url":"https://avatars1.githubusercontent.com/u/5296748?v=4","gravatar_id":"","url":"https://api.github.com/users/bboy-space","html_url":"https://github.com/bboy-space","followers_url":"https://api.github.com/users/bboy-space/followers","following_url":"https://api.github.com/users/bboy-space/following{/other_user}","gists_url":"https://api.github.com/users/bboy-space/gists{/gist_id}","starred_url":"https://api.github.com/users/bboy-space/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboy-space/subscriptions","organizations_url":"https://api.github.com/users/bboy-space/orgs","repos_url":"https://api.github.com/users/bboy-space/repos","events_url":"https://api.github.com/users/bboy-space/events{/privacy}","received_events_url":"https://api.github.com/users/bboy-space/received_events","type":"User","site_admin":false},"created_at":"2019-01-02T09:38:22Z","updated_at":"2019-01-02T09:38:22Z","author_association":"NONE","body":"Hi @d0p3fish ,\r\n\r\nFirst of all, Happy new year :)\r\nI have new elements for the investigation.\r\n\r\nLooking at the real error in developer tools, from the Ajax call it says : \r\n`Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in E:\\projects\\backoffice\\third_party\\filemanager\\UploadHandler.php on line 570`  (cf screenshot)\r\n\r\n![image](https://user-images.githubusercontent.com/5296748/50586389-7cd9f000-0e79-11e9-8671-0e1d129bf356.png)\r\n\r\nCurrent code: \r\n- comment enabled on @exif_imagetype AND property MaxChunkSize = 0\r\n\r\nInvestigation:\r\n- First workaround, I added `ini_set('memory_limit', '2G');` at the beginning of UploadHandler.php file\r\n- I tried again => upload success but still not creating thumbnail\r\n- Tried to set back JS MaxChunkSize to initial value => same (works without thumbnail)\r\n- Tried to remove comments on @exif_imagetype => Upload error Filetype not allowed\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"bboy-space"}}