(Article content moved to a template) |
(Minor text correction.) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
For each resource type you may set several options to configure its behavior. | For each resource type you may set several options to configure its behavior. | ||
− | * <code>url</code> and <code>directory</code> – 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 [[ | + | * <code>url</code> and <code>directory</code> – 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 <code>baseUrl</code> and <code>baseDir</code> settings. |
* <code>maxSize</code> – is the maximum size of the uploaded image defined in bytes. You may also use shorthand notation. Available options are: <code>G</code>, <code>M</code>, <code>K</code> (case insensitive). Remember that <code>1M</code> equals 1048576 bytes (one Megabyte), <code>1K</code> equals 1024 bytes (one Kilobyte), <code>1G</code> equals 1 Gigabyte. | * <code>maxSize</code> – is the maximum size of the uploaded image defined in bytes. You may also use shorthand notation. Available options are: <code>G</code>, <code>M</code>, <code>K</code> (case insensitive). Remember that <code>1M</code> equals 1048576 bytes (one Megabyte), <code>1K</code> equals 1024 bytes (one Kilobyte), <code>1G</code> equals 1 Gigabyte. | ||
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> – 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>allowedExtensions</code> – the file extensions you wish to be allowed for upload with CKFinder. If left empty, only <code>deniedExtensions</code> is used to check uploads. The <code>NO_EXT</code> value can be used for enabling files without an extension. |
− | * <code>deniedExtensions</code> – the file extensions you do not wish to be uploaded with CKFinder. | + | * <code>deniedExtensions</code> – the file extensions you do not wish to be uploaded with CKFinder. The <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> |
Latest revision as of 12:43, 4 September 2019
Resource Type Options
For each resource type you may set several options to configure its behavior.
-
url
anddirectory
– 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 thebaseUrl
andbaseDir
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 that1M
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, onlydeniedExtensions
is used to check uploads. TheNO_EXT
value can be used for enabling files without an extension. -
deniedExtensions
– the file extensions you do not wish to be uploaded with CKFinder. TheNO_EXT
value can be used for denying files without an extension.
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.