DrumAt5280
Technical User
Code:
<cftry>
<!--- catch bad file types if JS fails to do it. --->
<cffile action="upload" filefield="uploadfile1" destination="D:\inetpub\example\photos\"
ACCEPT="image/jpg, image/JPG, image/jpeg, image/JPEG, image/gif, image/png, image/xpng" nameconflict="makeunique">
<cfcatch type="any">
<p class="error"><span class="style1">Incorrect image type for uploaded.</span> </p>
<p class="error">Make sure the image type's format in the follow: <strong>
jpg, jpeg, gif, or png</strong>. <br />
<br />
Please use the back button in your browser and try again.</p>
<cfabort>
</cfcatch>
</cftry>
For some reason this code will accept a png image on FireFox just fine, but when I try it with IE the cfcatch catches an error for some reason.
I read somewhere that i needed to add "image/xpng" to fix this issue which i did, but that didn't help.
Any ideas?
Thanks and Merry Christmas!