-
1. Re: CF9 - best way to restrict file type for uploads??
WolfShade Feb 11, 2013 5:35 AM (in response to WolfShade)I'm currently using the unreliable method of checking the file extension. Is there a better way in CF9?
Thank you,
^_^
-
2. Re: CF9 - best way to restrict file type for uploads??
BKBK Feb 11, 2013 10:14 AM (in response to WolfShade)What about just using the accept attribute? That's what it's there for. Just something like:
<cffile
action="upload"
filefield="fileContent"
accept="application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, image/gif, application/pdf"
...
...
etc.
-
3. Re: CF9 - best way to restrict file type for uploads??
WolfShade Feb 11, 2013 2:03 PM (in response to BKBK)Because according to the documentation, the accept parameter relies upon the browser to provide that information.
I'd rather detect the mimetype, then go from there. I heard that this is in place in CF10, but not CF9. I was hoping someone would have written a UDF for CF9.
^_^


