Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1    Statistic  


Finds a mime type for a file extension.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Text 5.4 Yes Yes Yes Yes Yes

MBS( "Text.FileExtensionToMimeType"; FileExtension )


Parameter Description Example value
FileExtension The file extension to lookup. Anything before a dot is ignored, so you can pass whole file name or path. "test.pdf"


Returns OK or error.


Finds a mime type for a file extension.

Please report any missing mime type in our lookup table, so we can add more.
See also Text.MimeTypeToFileExtension.


Find mime type for PDF:

MBS("Text.FileExtensionToMimeType"; "pdf")

Example result: application/pdf

Find mime type for whole file name:

MBS("Text.FileExtensionToMimeType"; "my.test.pdf")

Example result: application/pdf

See also

Example Databases

Text.EncodeURLComponent   -   Text.FindBetween

Feedback: Report problem or ask question.

MBS Xojo blog