Whatever message this page gives is out now! Go check it out!
{{fileGetMimeType(path, strict)
fileGetMimeType(fileObject,strict)}}Parameter | Description |
path | Full path on disk to the file if strict is set to true. If you do not specify the full path, the file is assumed to be present in the temp directory, as returned by the function getTempDirectory. |
fileObject | Name of the file object. |
strict | If false, determines the file type by extension. The default value is true. |
<cfscript>
//Case 1.
mime.mimeType1 = FilegetMimeType(expandPath(‘/folder1/test.pdf’));
//Case 2.
mime.mimeType2 = FilegetMimeType(expandPath(‘/folder1/test.pdf’),false);
//Case 3.
mime.mimeType3 = FilegetMimeType(expandPath(‘/folder1/test.txt’));
//Case 4.
mime.mimeType4 = FilegetMimeType(expandPath(‘/folder1/test.txt’),false);
writeDump(mime);
</cfscript>