Uploading files

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).
  •  Page attachments - files attached to pages (e.g. Pages -> select page -> Properties -> Attachments).

Requirements for uploading multiple files

The following conditions must be fulfilled to allow uploading of multiple files:

  • The application has the write-to-disk permission for the temporary file repository (CMS/App_Data/CMSTemp/MultiFileUploader folder).
  • The client browser supports HTML 5 (for example, the system only allows uploading of single files for older versions of Internet Explorer)

How it works

  1. Select one or more files from a given location.

Selecting files

  1. The files are downloaded as temporary files to a repository (CMS\App_Data\CMSTemp\MultiFileUploader). To upload the files successfully, users need to avoid causing a post back on the page containing the upload form field.

  2. When the upload is finished, the temporary files become the requested files:

Media library

If a post back occurs while uploading multiple files or another error occurs, the temporary files remain in the temporary repository.

The system provides 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).