This content has been marked as final. Show 5 replies
I immediately thought of
cfif isDefined("form.company_logo_file") and form.company_logo_file neq "">
<cfset request.accept = "image/*">
Unfortunately that doesn't help when trying to limit users to only GIF's and TIFF's and not JPG's, BMP's etc.
I have found out that it is actually a problem with internet explorer. When i submit a file upload in FF it shows the correct MIME type. In IE it comes through as the incorrect one or octet/stream.
I have had to change my code to test on file extension instead.
I had to do the same - I built a script to check the extensions and filtered this way..
I would not have it look at the mime type, but have it look at the actual extension. If it doesnt match the ext, delete it.
You could put the extensions in a list, or array, and have it check it to see if it is in the list or array, and if not, nuke it.
Thanks for your help guys/girls? As I mentioned in my second post, I have changed the way i limit file using extensions.