I have this routine to let users upload a photo to my server. I used to just accept gif's , now I allow for .jpgs so I add them to the accept field. Now my script bombs. loading any type of file. Here is my code.

<cftry>
<cffile action="">   destination="c:\ixxxxx\uploads\"
  nameconflict="makeunique"
  filefield="image"
  accept="image/gif,image/jpg,image/jpeg">

<cfcatch type="any">
<SCRIPT>
  alert("Sorry! the image was not a .gif, or .jpg image type");
self.location ='image.cfm';
</SCRIPT>
</cfcatch>
</cftry>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to