You can upload files in Kentico either one by one or as multiple files. This can be useful if you need to upload a greater number of files at once, or if you need to perform the task quickly. Uploading multiple files at once is available for:
- Media files - files in media libraries (e.g. Media libraries -> Edit ( ) media library -> Files).
- Meta files - files related to specified objects (e.g. e-mail template attachments in E-mail templates -> Edit ( ) e-mail template -> General).
- Document attachments - files attached to documents (e.g. Pages -> select document -> Properties -> Attachments).
Enabling upload of multiple files
To enable upload of multiple files in the system, make sure:
The value of the CMSUseSilverlightUploader key is set to TRUE, or the key is not added to the appSettings section of the web.config file.
<add key="CMSUseSilverlightUploader" value="true" />
- The application has the write-to-disk permission for the temporary files repository, i.e. for ~\App_Data\CMSTemp\MultiFileUploader.
- is installed on your client computer.
How it works
1. First you need to select one or more files from a given location.
2. The files are downloaded as temporary files to a temporary repository (App_Data\CMSTemp\MultiFileUploader). However, to upload the files successfully, during upload you need to avoid POST BACK on the current page.
3. When the upload is finished, the temporary files become the requested files:
If you don't avoid POST BACK during the upload of multiple files or some other error occurs, the temporary files remain in the temporary repository.
That's why there is the Delete old temporary upload files scheduled task (configurable in the Scheduled tasks application), which deletes these temporary files, by default older than 24h. You can change this setting by changing the value of the CMSDeleteTemporaryUploadFilesOlderThan key (you need to manually add the key into the web.config file of the current web project folder).