MimeType

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.

Syntax

MimeType(file)

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

Parameters

Name
Type
Required
Description

file

file

โ˜‘๏ธ

a file

Last updated

Was this helpful?