0

everyone

I'm using ckfinder in laravel5.2, and I want to use ckfinder in a entire page without ckeditor.

I did as the document said, I can upload an image or a file, and I can view an image,but I can not view a file like ".doc, .xlsx", it just shows me a png, here you can see the screenshot enter image description here

the ckfinder/config.php

$config['authentication'] = function () {
    return true;
};
....
$config['backends'][] = array(
    'name'         => 'default',
    'adapter'      => 'local',
    'baseUrl'      => '/ckfinder/userfiles/',
    //'root'         => '', // Can be used to explicitly set the CKFinder user files directory.
    'chmodFiles'   => 0777,
    'chmodFolders' => 0755,
    'filesystemEncoding' => 'UTF-8',
);

 /*================================ Resource Types=====================================*/
// http://docs.cksource.com/ckfinder3-php/configuration.html#configuration_options_resourceTypes

$config['defaultResourceTypes'] = '';

$config['resourceTypes'][] = array(
    'name'              => 'Files', // Single quotes not allowed.
    'directory'         => 'files',
    'maxSize'           => 0,
    'allowedExtensions' =>'7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip',
    'deniedExtensions'  => '',
    'backend'           => 'default'
);

$config['resourceTypes'][] = array(
    'name'              => 'Images',
    'directory'         => 'images',
    'maxSize'           => 0,
    'allowedExtensions' => 'bmp,gif,jpeg,jpg,png',
    'deniedExtensions'  => '',
    'backend'           => 'default'
);

Do I need to configure others?

Sawyer
  • 11
  • 3

1 Answers1

1

It's not possible. CKFinder doesn't offer preview feature for .doc nor .xlsx files.

zaak
  • 745
  • 7
  • 14
  • Thank you for your reply,but the domo here https://cksource.com/ckfinder/demo shows me that it can preview a file like word or excel document. So,I do not understand how does it archive? – Sawyer May 10 '17 at 21:53
  • Could you please create a screenshot? I'm not sure which feature are you talking about. Maybe it's PDF preview? – zaak May 11 '17 at 05:48
  • Yes, it's pdf fomart. here you can seen the screenshot :[enter image description here][1]: https://i.stack.imgur.com/UOXh1.png – Sawyer May 15 '17 at 03:00