UrlHelper.ContentUrl Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Overloads

ContentUrl(Entity, string, bool, bool) Returns the url to the content (binary data) of a Entity<File>.
ContentUrl(ExternalLink, bool, bool, bool) Returns a content url for the external link (only for links that reference files).

ContentUrl(Entity, string, bool, bool)

Returns the url to the content (binary data) of a Entity<File>.

public static string ContentUrl(this Entity<File> file, string extension = null, bool absolute = false, bool download = false)

Parameters

file
Weavy.Core.Models.Entity

The entity to get url for.

extension
string

File extension of desired output format, null to keep original format.

absolute
bool

false to return a relative url or true to return an absolute url.

download
bool

false to return an url for displaying the content inline or true to return an url for downloading the content.

Returns

string

ContentUrl(ExternalLink, bool, bool, bool)

Returns a content url for the external link (only for links that reference files).

public static string ContentUrl(this ExternalLink link, bool password = false, bool absolute = false, bool download = false)

Parameters

password
bool

true to include the (hashed) password in the url, otherwise false

absolute
bool
download
bool

Returns

string