Table of Contents

Class MediaFileURLProvider

Namespace
CMS.MediaLibrary
Assembly
CMS.MediaLibrary.dll

URL provider for the media files.

public class MediaFileURLProvider : AbstractBaseProvider<MediaFileURLProvider>, ICustomizableProvider
Inheritance
object
MediaFileURLProvider
Implements
Inherited Members
Extension Methods

Methods

GetMediaFileUrl(MediaFileInfo, string)

Returns relative URL path to the media file.

public static string GetMediaFileUrl(MediaFileInfo fileInfo, string libraryFolder)

Parameters

fileInfo MediaFileInfo

Media file info object

libraryFolder string

Library folder name

Returns

string

GetMediaFileUrl(Guid, string)

Returns relative URL path to the media file which is rewritten to calling GetMediaFile.aspx page where user permissions are checked.

public static string GetMediaFileUrl(Guid fileGuid, string fileName)

Parameters

fileGuid Guid

File GUID

fileName string

File name

Returns

string

GetMediaFileUrl(string, string)

Returns relative URL path to the media file.

public static string GetMediaFileUrl(string libraryFolder, string filePath)

Parameters

libraryFolder string

Library folder name

filePath string

File path within the library folder

Returns

string

GetMediaFileUrlInternal(MediaFileInfo, string, string)

Returns relative URL path to the media file.

protected virtual string GetMediaFileUrlInternal(MediaFileInfo fileInfo, string libraryFolder, string filePath)

Parameters

fileInfo MediaFileInfo

Media file info object

libraryFolder string

Library folder name

filePath string

File path within the library folder

Returns

string

GetMediaFileUrlInternal(Guid, string)

Returns relative URL path to the media file which is rewritten to calling GetMediaFile.aspx page where user permissions are checked.

protected virtual string GetMediaFileUrlInternal(Guid fileGuid, string fileName)

Parameters

fileGuid Guid

File GUID

fileName string

File name

Returns

string