The FileName()
function returns the name of a file.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the name of the file.
Returns Unknown
if the parameter value (file) is unknown.
FileName('Data'.'ConceptWithFile':'File')
Result: image29.jpg
FileName(
unknownfile
)
Result: unknown
Name | Type | Required | Description |
---|---|---|---|
file
file
the file
The FileSize()
function returns the size of a file, in KB’s.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a number, which is the size of the given file, in KB’s.
Returns Unknown
if the parameter value (file) is unknown.
FileSize([PngImageFile])
Result: 60.0 (in KB - kilobytes)
FileSize(
unknownfile
)
Result: unknown
Name | Type | Required | Description |
---|---|---|---|
file
file
the file of which the size has to be calculated
The MimeType()
function returns the type of a provided file, based on its extension and the first few bytes in the file.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a text that contains the mime type of a file.
Returns Unknown
if the parameter value (file) is unknown.
Common media types are listed on wikipedia.
MimeType([PngImageFile])
Result: "image/png"
MimeType([JPG-ImageFile])
Result: "image/jpeg"
MimeType([CSV-File])
Result: "text/csv"
MimeType([PDF-File])
Result: "application/pdf"
MimeType(
unknownfile
)
Result: unknown
Name | Type | Required | Description |
---|---|---|---|
file
file
a file
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.
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.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
FileUrl([PngImageFile])
Result: "/static/files/32655/Logo-WEM.png"
FileUrl(
unknownfile
)
Result: unknown
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
Name | Type | Required | Description |
---|
| file | the file of which the URL will be returned |
| boolean | indicate whether or not to include the full domain (default false) |