Last updated 2 years ago
Was this helpful?
The MimeType() function returns the type of a provided file, based on its extension and the first few bytes in the file.
MimeType()
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.
Unknown
Common media types are listed on wikipedia.
MimeType(
file
)
MimeType([PngImageFile]) Result: "image/png"
MimeType([PngImageFile])
MimeType([JPG-ImageFile]) Result: "image/jpeg"
MimeType([JPG-ImageFile])
MimeType([CSV-File]) Result: "text/csv"
MimeType([CSV-File])
MimeType([PDF-File]) Result: "application/pdf"
MimeType([PDF-File])
MimeType(unknownfile) Result: unknown
unknownfile
a file