<!--- if there is any problem during upload wrong file type, no file, paths, permissions... whatever, the user sees the error message #errmsg# --->
<cftry> <CFFILE ACTION="UPLOAD" FILEFIELD="Form.Upload1" DESTINATION="C:\Inetpub\wwwroot\imghost\#SecureCheck.txtUserName#" NAMECONFLICT="MAKEUNIQUE" ACCEPT="text/html"> <cfcatch type="any"> <cfset errmsg = "Problemos problemos problemos...."> </cfcatch> </cftry> <cfif isdefined('errmsg')> <cfoutput>#errmsg#</cfoutput> </cfif> or you could redirect to the form with something like <cflocation url="form.cfm?errmsg=#errmsg#" addtoken="no"> right after the "<cfset errmsg... ----- Original Message ----- From: "Matthew Walker" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, May 28, 2003 3:32 PM Subject: RE: CFFILE Upload question > I would be inclined to add a JavaScript check also. Saves the user having to > upload the file. Note that you can't clear the field with JS, but you can > clear the whole form (reset()) which is useful if the upload is the only > field on the form. > > > -----Original Message----- > > From: Scott Wolf [mailto:[EMAIL PROTECTED] > > Sent: Thursday, 29 May 2003 9:14 a.m. > > To: CF-Talk > > Subject: CFFILE Upload question > > > > If I specify MIME types in the ACCEPT attribute such as: > > > > <CFFILE ACTION="UPLOAD" FILEFIELD="Form.Upload1" > > DESTINATION="C:\Inetpub\wwwroot\imghost\#SecureCheck.txtUserName#" > > NAMECONFLICT="MAKEUNIQUE" ACCEPT="text/html"> > > > > What happens if someone tries to upload a file that isn't on the "accept" > > list (like a jpg)? Does a CF error page display? I'm new to working with > > CFFILE and I'm not even sure if I'm asking the right question. Any help > > would be greatly appreciated. Thanks! > > > > Scott Wolf > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4