Kentico Xperience 13 documentation and ASP.NET Core

Most documentation about running Xperience applications under ASP.NET Core can be found in a dedicated section: Developing Xperience applications using ASP.NET Core. The rest of the documentation still applies, but some code samples and scenarios might need slight modifications for Core projects.

Certain pages allow you to switch between Core and MVC 5 content using a selector located under the page heading.

All major differences between the MVC 5 and Core platforms are summarized in Migrating to ASP.NET Core.


Configuring supported file types in Media libraries

Media libraries support the following types of images: bmpgifpngjpgjpegtifftif. These types of image files can be displayed on your site by default.

The system detects audio and video files based on their MIME type (audio types starting with the audio/ prefix and video types starting with the video/ prefix). For successfully detected audio and video file types, the system renders appropriate HTML5 markup. The types of files that can be previewed or played on your site therefore depend on the web browser (modern HTML5 web browsers typically support one or more of the oggmp4, or webm video codecs, and mp3wav, or ogg audio codecs).

All other file types are recognized as documents, which means that you cannot 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.

Allowing custom file types to be added into media libraries

By default, the system can recognize and process any media types, if you have the right player for the given file type. You can allow custom file types by modifying the site's web.config file. However, by specifying allowed file types using web.config keys, you disable the automatic detection and support for media file types other than those explicitly added to the site's web.config file.

Example of configuring custom detection of media file types

To allow only media files of specified types to be added into media libraries:

  1. Add the following keys into the appSettings section of your web.config file.

    <add key="CMSImageExtensions" value="bmp;gif;ico;png;wmf;jpg;jpeg;tiff;tif" /> 
    <add key="CMSAudioExtensions" value="wav;mp3" /> 
    <add key="CMSVideoExtensions" value="mp4;ogg" />
  2. Save the web.config file.

Vector graphic formats unsupported

Vector graphic formats (such as svg, eps, pdf, ai) are not supported as image extensions in media libraries. These formats can be stored as documents, but cannot be displayed as images.

Allowing upload of selected files into media libraries

  1. Open the Settings application.
  2. Navigate to the Content -> Media category.
  3. Add the selected file extensions into the Media file allowed extensions setting (separated by semicolons).
  4. Save the changes.

Was this page helpful?