Uploading files into media libraries

There are three ways how files can be uploaded into a media library:

 

Via the administration interface
On the live site via the Media gallery web part
Externally, directly into the file system - e.g. via FTP

 

In the following examples, you will learn how to add files into media libraries via the adminstration interface, on the live site and via FTP.

 

Uploading files via the administration interface

 

If you choose to Edit (Icon_Edit) a media library in CMS Desk -> Tools -> Media libraries, you can manage files in the library on the Files tab.

 

1. It is a good idea to keep your files organized in folders within the media library. To create a new folder, click the New link at the top left corner of the page.

 

clip0237

 

2. Enter the name of the folder, e.g. pictures, and click OK.

 

clip0238

 

3. The folder is now created. You can upload files into the folder by clicking the Upload file link at the top right corner of the page.

 

clip0239

 

4. The following dialog appears, letting you upload the file. Enter the following details:

 

File - path to the file you wish to upload
Preview - path to the image that will be used as the file's preview; only images can be used as previews of any type of files; this field is optional
Description - text describing the file

 

And click Save. If you want to upload another file right after this one, click Save and create another. Try uploading a few files.

 

clip0240

 

5. The files are now stored in the media library and should be displayed in the list, as you can see in the screenshot below.

 

clip0241

 

6. If you click some of the uploaded files, you can re-upload the file directly by the controls highlighted in the screenshot below. Like this, the original file will be deleted and replaced by the newly uploaded one.

 

clip0322

 

7. You may also have noticed the Edit (Icon_Edit) icon next to the listed items. This icon appears only with images and when clicked, the image gets opened in the built-in image editor.

 

8. Now if you go to the site folder in your file system, you will find the media library under the media folder, as you can see the screenshot below. The location of the folder may be customized as described here.

 

clip0242

 

 

On-site upload via the Media gallery web part

 

The Media gallery web part has the following two properties enabling on-site file upload:

 

Allow upload - enables on-site upload of files
Allow upload preview - enables on-site upload of file previews

 

If these properties are enabled, the controls highlighted in the screenshot below will be displayed in the web part, letting users upload the files or previews:

 

clip0321

 

 

External upload

 

9. Files can also be uploaded externally, without any use of Kentico CMS administration interface or on-site web parts, e.g. using FTP. To do this, you simply need to copy the files into the appropriate folder of the media library.

 

For the purposes of this example, try uploading another file into the pictures folder by copying it using windows explorer or any other file manager.

 

clip0243

 

10. If you go back to the Media library administration interface, you will see the file present in the list. As you can notice, this file is marked with the warning (Icon_Warning) icon. This means that the file has not yet been registered in the database. Such files can not be used on the site and have to be registered first. This happens only to externally uploaded files, files uploaded via the administration interface are registered in the database automatically.

 

To register the file, you have to click the Import (Icon_Import) icon, which creates the file's record in the database. Batch file import can be done by selecting more files by the check-boxes, selecting Import from the Selected files drop-down list and clicking OK.

 

clip0244