Reputation: 2650
When I try to determine a file's mime type with getPageContext().getServletContext().getMimeType()
, it returns undefined
if the extension is in uppercase (e.g., image.JPG
). Has anyone run into this before? I know there is FileGetMimeType
, but that gives me another set of issues within the codebase in which I'm working. I am running ColdFusion 10.
Upvotes: 2
Views: 1424
Reputation: 29870
This appears to be a regression in ColdFusion 10 (it works fine on CF9). I'd go through the motions of raising a bug, but Adobe will more than likely say one or more of:
None are particularly satisfactory, but it's an easy out for Adobe.
TBH, I'd just lowercase the filename before passing it to the function. It's not like it needs to be the actual name of a real file.
Upvotes: 4