Copy link to clipboard
Copied
If I have a cffileupload that points to a page with this code:
<cffile action="uploadAll" destination="#DocPath#\" nameConflict="MakeUnique" result="myDoc" accept="application/msword">
Then I end up with an empty Array. If I remove the accept tag then I upload the file just fine. I am uploading a valid msword.doc file. I have even tried the vnd.openxmlformats-officedocument.wordprocessingml.document for 2007 docx files. Nothing seems to work and it doesn't give any error, it just doesn't do it.
Any ideas on how to check the mimetype of what to upload?
Disclaimer: I have not used the uploadAll version of CFFILE.
The use of the accept attribute to specify allowable MIME types requires that the web browser supply the expected MIME type values in its form post. I've seen this fail on both web browser and when using a Flex application. I would avoid use of the accept attribute and write your own validation of the file extension.
Copy link to clipboard
Copied
Disclaimer: I have not used the uploadAll version of CFFILE.
The use of the accept attribute to specify allowable MIME types requires that the web browser supply the expected MIME type values in its form post. I've seen this fail on both web browser and when using a Flex application. I would avoid use of the accept attribute and write your own validation of the file extension.
Copy link to clipboard
Copied
I found this article:
http://www.petefreitag.com/item/701.cfm and it had good information on how to make sure people do not upload something that I don't want. Thanks for your response.