MediaLibraryHelperGetPermanentUrl Method |
Returns a permanent URL to the media file.
Namespace: CMS.MediaLibraryAssembly: CMS.MediaLibrary (in CMS.MediaLibrary.dll) Version: 13.0.131
Syntax public static string GetPermanentUrl(
MediaFileInfo mediaFile
)
Parameters
- mediaFile
- Type: CMS.MediaLibraryMediaFileInfo
Media file which the URL will be generated for.
Return Value
Type:
StringExceptions Exception | Condition |
---|
ArgumentNullException | mediaFile is null. |
Remarks
Generates various URL types depending on the media library location:
URL | Location |
---|
~/getmedia/fileGUID/fileName.extension | Media file is located in a media library on the current site. |
http://domain.com/getmedia/fileGUID/fileName.extension | Media file is located in a media library on a different site. |
See Also