0

I am trying to configure elfinder maxfilesize option in connector.php array options but still I am getting this error:

File exceeds maximum allowed size.

Here is My Configuration in connector.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,
        )
    )
);

How can I solve this issue?

Thanks

4
  • What is your server? apache? nginx?
    – Dmitriy
    Mar 10, 2016 at 11:24
  • I am using apache.I configure php.ini also
    – tcetin
    Mar 10, 2016 at 11:30
  • what is the value php_value upload_max_filesize in .htaccess? or upload_max_filesize in php.ini?
    – Dmitriy
    Mar 10, 2016 at 11:37
  • @DmitriyLoskutov I solved with apache php.ini now.Thanks for your trying helps
    – tcetin
    Mar 10, 2016 at 11:42

1 Answer 1

0
 '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'),
            )

        )
1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – DSDmark
    May 31, 2023 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.