ForMedia(Media, bool)

Gets a object with the location for the specified media item.

public Uri ForMedia(Media media, bool canonical = False)
Returns:
Uri

Parameters

media Media

The media item to get the for.

canonical bool

If false, the current request host is used to construct the uri (default). If true, the canonical (primary) host is used (which may be the same as the current host).

ForMedia(IPublishedContent, bool)

Gets a object with the location for the specified media asset.

public Uri ForMedia(IPublishedContent asset, bool canonical = False)
Returns:
Uri

Parameters

The media asset to get the for.

canonical bool

If false, the current request host is used to construct the uri (default). If true, the canonical (primary) host is used (which may be the same as the current host).

In this article