The server configuration encompasses parameters that directly related to the directory structure on the server and to various limitations stipulated mostly by security.
All other parameters are configured on the widget side.
Note that we have a dedicated material describing information security. That article thoroughly describes many parameters in terms of unauthorized access prevention.
The list of server side parameters
Specifies the path to a directory where uploaded files will be stored. Depending on the server (PHP, Java, etc.) various relative paths are possible, so to avoid discrepancies, we recommend using an absolute path in this and other parameters specifying the path to the directory.
: stringSets the path to a temporary directory. This directory is actively used by the transaction mechanism of File Uploader. It is this directory where the uploaded files stay until they are committed (moved to the dirFiles directory). After commit, files are deleted from the
dirTmp directory, but this can be prevented with the keepUploads option.
falseIf you set
false to this parameter, all uploads (cancelled and committed) will be saved to the dirTmp directory until you delete them manually.
The comma-separated list of extensions allowed for uploading to the server. If the parameter is not set or is empty, any extensions are allowed.
JPEG quality used to save resized images. 1 - lowest quality, minimum size, 100 - best quality, maximum size. Set this parameter depending on how you want images to display on the website. Don't worry about possible future resizes: to prevent manifold quality losses due to compression, File Uploader saves the original image using the "-original" suffix in the background whenever the main image is modified for the first time. It is this copy of the original that will be used for further resizes.
Maximum file size (in bytes) allowed for upload. This limit applies only to files that a user uploads to the server and does not apply to files being edited. Therefore, if the user sets the size of the image larger than the original, the file will take more disk space, but the limit will not apply.
maxImageResizeWidth, maxImageResizeHeight: number
The maximum allowed target size for resize. If at least one value (height or width) exceeds this threshold in the request of the widget, the server refuses the attempt to resize the image. This limitation is used to prevent unnecessary load to the server either malicious (DDoS) or occasional.
This parameter allows you to execute the server script of the uploader from another domain that is different from the domain of the uploader. This means you must set this parameter if your widget works on one website, while the server part of File Uploader is located on another website. You can set this parameter to
*, which will allow the widget to normally function from any website, or specify a specific domain, for example
Example of server configuration
Depending on the server, there are various formats of parameter values. For example, in PHP all settings are configured in
config.php. Here is an example of configuration that sets uploaded file limits and allowed extensions, and defines the main upload directory:
$config['allowedExtensions'] = 'jpeg,jpg,png,gif,zip,pdf';
$config['maxFileSize'] = 14000000;
$config['baseDir'] = '/var/www/images/';
In order to learn where and how to specify settings of the server part of File Uploader, please refer to the corresponding section of the uploader installation article.