我正在尝试在连接器.php数组选项中配置 elfinder 最大文件大小选项,但仍然收到此错误:
File exceeds maximum allowed size.
这是我在连接器.php中的配置:
$opts = array(
// 'debug' => true,
'roots' => array(
array(
'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
'path' => '../files/', // path to files (REQUIRED)
'URL' => dirname($_SERVER['PHP_SELF']) . '/../files/', // URL to files (REQUIRED)
'uploadDeny' => array('all'), // All Mimetypes not allowed to upload
'uploadAllow' => array('image', 'text/plain','application/vnd.ms-excel','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/x-rar-compressed, application/octet-stream','application/zip, application/octet-stream'),// Mimetype `image` and `text/plain` allowed to upload
'uploadOrder' => array('deny', 'allow'), // allowed Mimetype `image` and `text/plain` only
'accessControl' => 'access', // disable and hide dot starting files (OPTIONAL),
'uploadMaxSize' => 1000000,
)
)
);
如何解决此问题?
谢谢
'roots' => array(
array(
'uploadMaxSize'=>'200KB',
'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
'path' => DIR_IMAGE . 'catalog/', // path to files (REQUIRED)
'URL' => $domain . 'image/catalog/',
'tmbPath' => DIR_IMAGE . 'elfinder_tmb',
'tmbURL' => $domain . 'image/elfinder_tmb/',
'tmbSize' => 100,
'tmbCrop' => false,
'tmbBgColor' => '#ffffff',
'mimeDetect' => 'internal',
'defaults' => array('read' => true, 'write' => true/*,'locked'=>true*/),
'imgLib' => 'auto',
'winHashFix' => DIRECTORY_SEPARATOR !== '/', // to make hash same to Linux one on windows too
'uploadAllow' => array('image/jpeg', 'image/png', 'image/gif', 'image/svg+xml',
// "особые" типы древних IE добавил на всякий случай sitecreator
'image/pjpeg', 'image/webp', 'image/x-png'),
'uploadDeny' => array('all'),
'uploadOrder' => array('allow, deny'),
)
)