Uploading files

Kentico  allows you to upload files one by one or select multiple files to upload at once. 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. email template attachments in Email templates -> Edit () email template -> General).
  • Page attachments – files attached to pages (e.g. Pages -> select page -> Properties -> Attachments).

Requirements

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

  • The application has the Write permission for the temporary file repository (CMS/App_Data/CMSTemp/MultiFileUploader folder).
  • The client browser supports HTML 5

How uploading files works

To upload files to Kentico:

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

  2. The files are downloaded as temporary files to a repository (CMS\App_Data\CMSTemp\MultiFileUploader).

    To successfully upload your files, avoid refreshing or causing a post back event on the page until the file upload process is complete.

  3. When the upload is finished, the uploaded files can be manipulated in the system:
    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 by default deletes all temporary files older than 2 hours. You can adjust this time span 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).