Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cffile accept png with FireFox not with IE

Status
Not open for further replies.

DrumAt5280

Technical User
Sep 8, 2003
194
0
0
US
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!
 
I figured it out, i needed this one too:

image/x-png,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top