Is this really the version you are looking for? Kentico Xperience 8.1 Documentation is no longer updated. Use the switcher in the header to choose your product version.
Using the Media libraries application, users can store various files, for example, photos, pictures, sound files, videos, package files, presentations or document files. This means that media libraries are able to store non-media types of files as well. You can set the site up to allow visitors to view and add content to media libraries. Media libraries can also be associated with certain groups.
This page covers some of the more general Media library settings:
Media libraries support the following types. They can play or display the files on your site by default:
All other file types are recognized as documents, which means that you can't play them as videos or display them as images. You can still store them in the library and users can download them on the live site.
You can allow custom file types by modifying the site's web.config and MediaControl.ascx control. The system can recognize and process any media types, if you have the right player for the given file type.
To enable .flv videos to be added into media libraries:
Note that the keys contain the extensions the system supports by default plus the .flv extension in the CMSVideoExtensions property.
<add key="CMSImageExtensions" value="bmp;gif;ico;png;wmf;jpg;jpeg;tiff;tif" />
<add key="CMSAudioExtensions" value="wav;wma;mp2;mp3;mid;midi;mpga" />
<add key="CMSVideoExtensions" value="avi;mp4;mpg;mpeg;wmv;qt;mov;rm;flv" />The default maximum uploaded file size into Media libraries in IIS 7 is 30MB. To enable uploads of larger files:
Edit your project's web.config file.
Modify the value of the <httpRuntime> element's maxRequestLength attribute. Enter the value in kiloBytes.
Important: Modify the <httpRuntime> element directly under the web.config's main <system.web> section, NOT within a specific <location> element.
Do not edit the maxRequestLength value inside the <location> element marked by the WebDav location comments, which the web.config contains by default.
<httpRuntime maxRequestLength="2000000" ... />Add the following <security> element into the web.config's main <system.WebServer> section. Enter the value of the <requestLimits> element's maxAllowedContentLength attribute in Bytes.
Important: Do NOT modify the <security> element inside the <location> element marked by the WebDav location comments, which the web.config contains by default.
...
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648"/>
</requestFiltering>
</security>
<modules>
<remove name="WebDAVModule" />
<remove name="XHtmlModule" />
<remove name="CMSApplicationModule" />
...Save the web.config file.
Users can now upload files in the size that you specified in the maxRequestLength and maxAllowedContentLength attributes into Media libraries.
When the thumbnail image or the image itself is larger than the required thumbnail image size, the system creates a copy in the required size. Both thumbnails and resized copies are stored in a hidden folder in the root of the media library folder. You can set the name of the folder in Settings -> Content -> Media -> Media file hidden folder.
If you upload the following files:
with the following settings defined in Settings -> Content -> Media:
the system stores the uploaded files in the media library folder with the following names:
The default location of all libraries of a particular site is ~/<sitename>/media. To customize the location:
Note: When you change the location of the media library folders, the system does NOT automatically move existing media files and sub-folders to the new location. To ensure that your media content is accessible and works correctly, you need to manually move the files from the old location to the new one in the file system.
If you are running the system on a web farm and have the same UNC root defined on all servers, it is necessary to add the following key into your web.config file. The files stored in the libraries are then not transferred when synchronizing the web farm content:
<add key="CMSWebFarmSynchronizeMediaFiles" value="false"/>If your project is configured to store files in an external storage, for example Azure Blob Storage or Amazon S3, make sure that you structure the media files into a hierarchy of folders. Storing a large number of media files in a single folder can significantly affect the performance of your project when editing the files in the Media library application.
Instead of storing all files in one folder, create a structure and divide the files into multiple folders. The number of files in one folder directly affects the performance of the Media library user interface.
Additionally, the system's automatic clearing of files from the server-side cache does not work for files stored in an external storage. If you modify a media file, the website may still display the old version until the cache expires (unless you manually clear the application's cache). See also: Caching files and resources