Kentico CMS 6.0 Developer's Guide

File naming conventions

File naming conventions

Previous topic Next topic Mail us feedback on this topic!  

File naming conventions

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

When a file is being uploaded to a media library, users can upload the file itself and its thumbnail. The thumbnail will be displayed in the file list in the Media gallery web part. Thumbnails are typically used if you want to upload some non-image file and attach an image which will be displayed as the file's thumbnail in the file list. For image files, the thumbnail can but doesn't have to be done, as the image itself will be used for this purpose.

 

When the thumbnail image or the image itself is larger than the required thumbnail image size, its resized copy will be created with the required size. Both thumbnails and resized copies are stored in a hidden folder in the root of the media library folder. The name of the hidden folder can be set in Site Manager -> Settings -> Content -> Media -> Media file hidden folder.

 

Format of media library files on the disk

 

File - <file name>.<file extension>.

Resized file - <hidden folder>/<file name>_<file extension>_<width>_<height>.<extension>.

 

Thumbnail - <hidden folder>/<file name>_<file extension><thumbnail suffix>.<thumbnail extension>.

Resized thumbnail - <hidden folder>/<file name>_<file extension><thumbnail suffix>_<width>_<height>.<thumbnail extension>.

 

Example

 

If you upload the following files:

 

Uploaded file - MyImage.jpg.

Uploaded thumbnail - MyPhoto.bmp.

 

with the following settings defined in Site Manager -> Settings -> Content -> Media:

 

Media file hidden folder - __thumbnails.

Media file thumbnail suffix - _preview.

 

the uploaded files will be stored in the following locations in the media library folder, with the following names:

 

File - MyImage.jpg.

Resized file - __thumbnails/MyImage_jpg_100_200.jpg.

 

Thumbnail - __thumbnails/MyImage_jpg_preview.bmp.

Resized thumbnail - __thumbnails/MyImage_jpg_preview_20_30.bmp.