FileUrl

The FileUrl() function returns the URL of a file.

Optionally - with the second parameter includeDomain set to true - it will return the URL including the full domain so it can be used externally as full absolute path.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the URL that points to the file, by default excluding the hostname (relative path).

If the second parameter is provided as true, it will include the hostname (full, absolute path).

Returns Unknown if the parameter value (file) is unknown.

FileUrl(file)

FileUrl([PngImageFile]) 👍Result: "/static/files/32655/Logo-WEM.png"

FileUrl(unknownfile) 👎Result: unknown

FileUrl(file, includeDomain)

FileUrl([PngImageFile], true) 👍Result: "https://portal.staging.wem.io/static/files/32655/Logo-WEM.png"

FileUrl([PngImageFile], false) 👍Result: "/static/files/32655/Logo-WEM.png"

FileUrl(unknownfile, unknownboolean) 👎Result: unknown

Parameters

NameTypeRequiredDescription

file

file

the file of which the URL will be returned

includeDomain

boolean

indicate whether or not to include the full domain (default false)

Last updated