ASSET_TYPE
Last updated
Last updated
The function ASSET_TYPE takes a Detailed Asset and returns the mime type of the Asset.
This function takes a Detailed Asset as input. It returns a String containing the mime type of the Asset, such as “image/jpeg” or “text/plain”.)
detailed_asset (required, type: Detailed Asset)
Any Detailed Asset. Note that a Detailed Asset is a subcategory of an Asset, and that the ASSET_TYPE function will not accept a general Asset as input, only a Detailed Asset.
type(type: string)
The MIME type of the Detailed Asset, which can be text, image, or any other valid type. Here is a table of supported data types:
Assume the example has access to the following Detailed Asset, detailed_asset:
The following example takes the Detailed Asset defined above and returns its MIME type. Note that this matches the value of the type property given above:
Mime Type
Type of Data
image/jpeg
Jpeg Image
image/png
PNG Image
application/pdf
image/svg+xml
An SVG XML file
image/gif
GIF image
audio/mpeg
MPEG Audio data
audio/mp3
An MP3 file
audio/wav
WAV audio file
video/mp4
MP4 Video file
text/html
HTML file
application/zip
Compressed Zip file
application/pgp-encrypted
First part of PGP encrypted data, body
application/vnd.ms-excel
Microsoft Excel file
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Microsoft Excel (OpenXML)
font/otf
OpenType font
font/ttf
TrueType Font
font/woff
Web Open Font Format (WOFF)
font/woff2
Web Open Font Format (WOFF)