I’m using ckeditor classic 5, and i’m trying to upload images in it. I downloaded php lib Ckfinder3 php connector, set config.
When i’m trying to load image i have a massage: Cannot upload file *filename*.
Interesting moment, that they are fisically loaded on server: i can view it in directory, that set in my config file and this files are correct:
/var/www/projectfiles/downloadfiles/
The next step i’m check permission and groups: it’s www-data 0777.
What can be a reason? Can you give some advice or solution?
Thanks!
UPD: init function
ClassicEditor .create( document.querySelector( '#material_preview' ), { ckfinder: { uploadUrl: '/ckfinder/connector/?command=QuickUpload&type=Images' } } ) .catch( error => { console.error( error ); } );
php config:
$config['authentication'] = function () { return true; }; $config['backends']['default'] = array( 'name' => 'default', 'adapter' => 'local', 'baseUrl' => 'http://files.project.com/downloadfiles/', 'root' => '/var/www/projectfiles/downloadfiles/', 'chmodFiles' => 0777, 'chmodFolders' => 0777, 'filesystemEncoding' => 'UTF-8' );
Advertisement
Answer
Finally i got it!
The connector path is valid. The problem was in cache folder’s permisson in laravel. Be glad if it helps you.