{"action":"created","issue":{"url":"https://api.github.com/repos/Studio-42/elFinder/issues/1795","repository_url":"https://api.github.com/repos/Studio-42/elFinder","labels_url":"https://api.github.com/repos/Studio-42/elFinder/issues/1795/labels{/name}","comments_url":"https://api.github.com/repos/Studio-42/elFinder/issues/1795/comments","events_url":"https://api.github.com/repos/Studio-42/elFinder/issues/1795/events","html_url":"https://github.com/Studio-42/elFinder/issues/1795","id":193753640,"number":1795,"title":"How to make each subfolder has its own .tmb folder?","user":{"login":"drmohm","id":19328707,"avatar_url":"https://avatars0.githubusercontent.com/u/19328707?v=4","gravatar_id":"","url":"https://api.github.com/users/drmohm","html_url":"https://github.com/drmohm","followers_url":"https://api.github.com/users/drmohm/followers","following_url":"https://api.github.com/users/drmohm/following{/other_user}","gists_url":"https://api.github.com/users/drmohm/gists{/gist_id}","starred_url":"https://api.github.com/users/drmohm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drmohm/subscriptions","organizations_url":"https://api.github.com/users/drmohm/orgs","repos_url":"https://api.github.com/users/drmohm/repos","events_url":"https://api.github.com/users/drmohm/events{/privacy}","received_events_url":"https://api.github.com/users/drmohm/received_events","type":"User","site_admin":false},"labels":[{"id":371581619,"url":"https://api.github.com/repos/Studio-42/elFinder/labels/howto","name":"howto","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-12-06T11:54:38Z","updated_at":"2018-05-24T16:21:08Z","closed_at":"2016-12-11T14:30:08Z","author_association":"NONE","body":"elfinder is really a perfect browser and I really like it, but I cannot achieve the following\r\nI want the thumbnails for each subfolder to be created in .tmb folder inside that subfolder, how I can do this?\r\n\r\ncould you please help me?"},"comment":{"url":"https://api.github.com/repos/Studio-42/elFinder/issues/comments/391775268","html_url":"https://github.com/Studio-42/elFinder/issues/1795#issuecomment-391775268","issue_url":"https://api.github.com/repos/Studio-42/elFinder/issues/1795","id":391775268,"user":{"login":"isreehari","id":3519250,"avatar_url":"https://avatars0.githubusercontent.com/u/3519250?v=4","gravatar_id":"","url":"https://api.github.com/users/isreehari","html_url":"https://github.com/isreehari","followers_url":"https://api.github.com/users/isreehari/followers","following_url":"https://api.github.com/users/isreehari/following{/other_user}","gists_url":"https://api.github.com/users/isreehari/gists{/gist_id}","starred_url":"https://api.github.com/users/isreehari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isreehari/subscriptions","organizations_url":"https://api.github.com/users/isreehari/orgs","repos_url":"https://api.github.com/users/isreehari/repos","events_url":"https://api.github.com/users/isreehari/events{/privacy}","received_events_url":"https://api.github.com/users/isreehari/received_events","type":"User","site_admin":false},"created_at":"2018-05-24T16:21:08Z","updated_at":"2018-05-24T16:21:08Z","author_association":"NONE","body":"Thank you for the quick update. Let me tell you when this happening I am using the preUpload method and when ever user upload a file I am moving under subfolder like this file-root-folder/year/month/file.ext eg: spfiles/2018/05/file.ext. Please find the following code. \r\n\r\n\r\n\r\n\r\n\r\n```\r\npublic function preUpload(&$path, &$name, $src, $elfinder, $volume){            \r\n\r\n            $currentYear = date(\"Y\");\r\n            $currentMonth = date(\"m\");\r\n            \r\n            $realpath = $elfinder->realpath($path);\r\n            $realpath =  $realpath. '/' .$currentYear;\r\n\r\n            if(!file_exists($realpath) || !is_dir($realpath)){\r\n                $args = array('target' => $path, 'name' => $currentYear, 'reqid' => '' );\r\n                $result = $elfinder->exec('mkdir', $args);\r\n                if($result && $result[\"added\"]){\r\n                    $path = $result['added'][0]['hash'];         \r\n\r\n                    $realpath = $realpath . '/' .  $currentMonth;\r\n                    $args = array('target' => $path, 'name' => $currentMonth, 'reqid' => '' );\r\n                    $result = $elfinder->exec('mkdir', $args);\r\n                    if($result && $result[\"added\"]){\r\n                        $path = $result['added'][0]['hash'];    \r\n                    }else{\r\n                        return false;\r\n                    }\r\n                }else{\r\n                    return false;\r\n                }              \r\n            }else{\r\n                $realpath = $realpath . '/' .  $currentMonth;\r\n                if(!file_exists($realpath) || !is_dir($realpath)){\r\n                    $args = array('target' => $path, 'name' => $currentMonth, 'reqid' => '' );\r\n                    $result = $elfinder->exec('mkdir', $args);\r\n                    if($result && $result[\"added\"]){\r\n                        $path = $result['added'][0]['hash'];    \r\n                    }else{\r\n                        $path = $volume->getHash($path, $currentMonth);\r\n                        return true;\r\n                    }\r\n                }                \r\n\r\n            }\r\n\r\n            $path = $volume->getHash($realpath, '');\r\n\r\n            return true;\r\n    }   \r\n\r\n```\r\n\r\n"}}
{"actor":{"display_login":"isreehari"}}