Duplicate Files Created in elfinder, "File Already Exists" Error whenever creating new folder

36 Views Asked by At

I am encountering an issue with elfinder where, upon creating a new file or folder, a duplicate file is generated, and I receive a "File Already Exists" error. I have not been able to pinpoint the cause of this behavior.

Below is my Connector configuration options elfinder 2.1

$opts = array(
    // 'debug' => true,
    'roots' => array(
        // Items volume
        array(
            'driver'        => 'LocalFileSystem',           // driver for accessing file system (REQUIRED)
            'path'          => $folder_path,                 // path to files (REQUIRED)
            'URL'           => dirname($_SERVER['PHP_SELF']) . '../'.$folder_path, // URL to files (REQUIRED)
            'trashHash'     => 't1_Lw',                     // elFinder's hash of trash folder
            'winHashFix'    => DIRECTORY_SEPARATOR !== '/', // to make hash same to Linux one on windows too
            'uploadDeny'    => array('all'),                // All Mimetypes not allowed to upload
            'uploadAllow'   => array('image/x-ms-bmp', 'image/gif', 'image/jpeg', 'image/png', 'image/x-icon', 'text/plain','application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip', 'application/octet-stream','video/mp4','video/x-m4v','video/webm','video/x-msvideo','video/quicktime','application/vnd.openxmlformats-officedocument.wordprocessingml.document','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip','application/x-executable', 'application/x-msdownload','application/excel','application/vnd.ms-excel','application/x-excel','application/x-msexcel'), // Mimetype `image` and `text/plain` allowed to upload
            'copyOverwrite' => true,
            'uploadOrder'   => array('deny', 'allow'),      // allowed Mimetype `image` and `text/plain` only
            'accessControl' => 'access',                     // disable and hide dot starting files (OPTIONAL)
            'uploadMaxSize' => '2G',    
        ),
        // Trash volume
        array(
            'id'            => '1',
            'driver'        => 'Trash',
            'path'          => $folder_path.'trash/',
            'tmbURL'        => dirname($_SERVER['PHP_SELF']) . '/../../uploads/silocloud/'.$user_id.'trash/.tmb/',
            'winHashFix'    => DIRECTORY_SEPARATOR !== '/', // to make hash same to Linux one on windows too
            'uploadDeny'    => array('all'),                // Recomend the same settings as the original volume that uses the trash
            'uploadAllow'   => array('image/x-ms-bmp', 'image/gif', 'image/jpeg', 'image/png', 'image/x-icon', 'text/plain','application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip', 'application/octet-stream','video/mp4','video/x-m4v','video/webm','video/x-msvideo','video/quicktime','application/vnd.openxmlformats-officedocument.wordprocessingml.document','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/x-msdownload','application/excel','application/vnd.ms-excel','application/x-excel','application/x-msexcel','application/x-executable'), // Same as above
            'uploadOrder'   => array('deny', 'allow'),      // Same as above
            'accessControl' => 'access',                    // Same as above
        ),
    )
);

I tried configurations like uploadOverwrite,copyOverwrite.But doesnt work anything.

0

There are 0 best solutions below