Gets a System.Uri 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 System.Uri 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