MimeType

circle-info

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.

circle-check
circle-exclamation

Syntax

chevron-rightMimeType(file)hashtag

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?