Difference between revisions of "Template:Ckfinder 2.x Built-in Resource Types Options"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

Line 8: Line 8:
 
   
 
   
 
You can use the following settings to list the file extensions that can be upload to the server:
 
You can use the following settings to list the file extensions that can be upload to the server:
* <code>allowedExtensions</code> &ndash; the file extensions you wish to be allowed for upload with CKFinder. If left empty, only <code>deniedExtensions</code> is used to check uploads. <code>NO_EXT</code> value can be used for files without extension.
+
* <code>allowedExtensions</code> &ndash; the file extensions you wish to be allowed for upload with CKFinder. If left empty, only <code>deniedExtensions</code> is used to check uploads. <code>NO_EXT</code> value can be used for enabling files without an extension.
* <code>deniedExtensions</code> &ndash; the file extensions you do not wish to be uploaded with CKFinder. <code>NO_EXT</code> value can be used for files without extension.
+
* <code>deniedExtensions</code> &ndash; the file extensions you do not wish to be uploaded with CKFinder. <code>NO_EXT</code> value can be used for denying files without an extension.
  
 
<note>Important: It is '''recommended''' to always use the <code>allowedExtensions</code> setting, in favor of <code>deniedExtensions</code>. If you leave <code>allowedExtensions</code> empty and you add an extension to the  <code>deniedExtensions</code> list, for example <code>pdf</code>, the settings will allow the upload of all other files except the files with the <code>pdf</code> extension. This approach is not a good way to secure your server from unwanted uploads. The best way is to put all of the preferred extensions in the <code>allowedExtensions</code> list. This is the only way to effectively secure your server from hacker attacks.</note>
 
<note>Important: It is '''recommended''' to always use the <code>allowedExtensions</code> setting, in favor of <code>deniedExtensions</code>. If you leave <code>allowedExtensions</code> empty and you add an extension to the  <code>deniedExtensions</code> list, for example <code>pdf</code>, the settings will allow the upload of all other files except the files with the <code>pdf</code> extension. This approach is not a good way to secure your server from unwanted uploads. The best way is to put all of the preferred extensions in the <code>allowedExtensions</code> list. This is the only way to effectively secure your server from hacker attacks.</note>

Revision as of 10:05, 4 September 2019

Resource Type Options

For each resource type you may set several options to configure its behavior.

  • url and directory – define the base URL address and the server directory used to handle and publish the files for this resource type. They follow the same rules as defined in the [[{{{link}}}|Quick Start]] section for the baseUrl and baseDir settings.
  • maxSize – is the maximum size of the uploaded image defined in bytes. You may also use shorthand notation. Available options are: G, M, K (case insensitive). Remember that 1M equals 1048576 bytes (one Megabyte), 1K equals 1024 bytes (one Kilobyte), 1G equals 1 Gigabyte.
    Example
    {{{example}}}

You can use the following settings to list the file extensions that can be upload to the server:

  • allowedExtensions – the file extensions you wish to be allowed for upload with CKFinder. If left empty, only deniedExtensions is used to check uploads. NO_EXT value can be used for enabling files without an extension.
  • deniedExtensions – the file extensions you do not wish to be uploaded with CKFinder. NO_EXT value can be used for denying files without an extension.
important note
Important: It is recommended to always use the allowedExtensions setting, in favor of deniedExtensions. If you leave allowedExtensions empty and you add an extension to the deniedExtensions list, for example pdf, the settings will allow the upload of all other files except the files with the pdf extension. This approach is not a good way to secure your server from unwanted uploads. The best way is to put all of the preferred extensions in the allowedExtensions list. This is the only way to effectively secure your server from hacker attacks.