mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[api] add optional query (int)'substitute' to command dim
The connector can return the URL of the substitute image whose size will fit in that pixel as the value of the key 'url' of the result data when the 'substitute' parameter gives with `dim` command from the client. Add the following two options on the client side config `commandsOptions.resize` to fixes #2251. ```javascript // File size (bytes) threshold when using the `dim` command for obtain the image size necessary to start editing getDimThreshold : 204800, // File size (bytes) to request to get substitute image (400px) with the `dim` command dimSubImgSize : 307200 ```
This commit is contained in:
@@ -59,6 +59,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
$this->options['followSymLinks'] = true;
|
||||
$this->options['detectDirIcon'] = ''; // file name that is detected as a folder icon e.g. '.diricon.png'
|
||||
$this->options['keepTimestamp'] = array('copy', 'move'); // keep timestamp at inner filesystem allowed 'copy', 'move' and 'upload'
|
||||
$this->options['substituteImg'] = true; // support substitute image with dim command
|
||||
}
|
||||
|
||||
/*********************************************************************/
|
||||
@@ -644,7 +645,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
protected function _scandir($path) {
|
||||
elFinder::extendTimeLimit();
|
||||
elFinder::checkAborted();
|
||||
$files = array();
|
||||
$cache = array();
|
||||
$dirWritable = is_writable($path);
|
||||
|
||||
Reference in New Issue
Block a user