My users are going to be uploading files with a .EXP extension. In ColdFusion on Windows 2003 I’m using getPageContext().getServletContext().getMimeType() to make sure that the file that they upload is of the correct mime-type, which will be text/plain. The issue I’m having is that no matter where I register the mime-type on the server, getPageContext().getServletContext().getMimeType() will return blank since it doesn’t know about the .EXP file extension. What is the trick to get ColdFusion to see this file extension.
Share
FINALLY!!!!
In order for getPageContext().getServletContext().getMimeType() to recognize the new filetype, you must edit the file:
In my case this file was located at:
I opened file file and found this line:
All I had to do was add my extension to the end like so:
Then I restart the ColdFusion service and invoking getPageContext().getServletContext().getMimeType() return text/plain.