Hi, You can also add some Javascript client side validation : http://www.massimocorner.com/beta/js_upload.htm
Benoit Hediard www.benorama.com > -----Message d'origine----- > De : Bryan F. Hogan [mailto:[EMAIL PROTECTED]] > Envoyé : mercredi 29 janvier 2003 19:39 > À : CF-Talk > Objet : RE: Screening files before CFFile upload > > > http://markme.com/cantrell/weblog/index.cfm?m=1&d=28&y=2003 > > ============================================ > Bryan F. Hogan > Director of Internet Development > Macromedia Certified ColdFusion MX Developer > Digital Bay Media, Inc. > 1-877-72DIGITAL > ============================================ > > -----Original Message----- > From: E. Keith Dodd [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 29, 2003 1:28 PM > To: CF-Talk > Subject: Screening files before CFFile upload > > > Am wondering whether I can check for size, appropriate extension, etc. on > files before they are uploaded using CFFile. Presently, I am uploading the > files (with limited use of attribute accept), then using the CFFile output > structure to delete any that don't fit my criteria. > > I am using MX and the standard html form for initial input with the > enctype="multipart/form-data" and the input type="file". > > > Searching the CFTalk archives, I found some referrals to being > able to check > the extension of the file on the action page BEFORE using CFFile. > One reference suggests using: > <cfif not listfindnocase("gif,jpg,jpeg",listlast(form.myfilefield,"."))> > to pick up any inappropriate extensions. > (http://www.mail-archive.com/cf-talk@houseoffusion.com/msg124531.html) > > I find that I cannot do anything like that because the form field value is > not the initial value in the field before submitting; it is one > with a .tmp > extension, as in: > C:\CFusionMX\runtime\servers\default\SERVER-INF\temp\wwwroot-tmp\n > eotemp\114 > 84.tmp > (I assume the process creates a temporary stored file.) > I get this result both locally on development MX (Using IE) and > on remote MX > server--tested with both IE and Netscape. > > Am I missing something? Based on my results, I can NOT *examine* the file > prior to cffile's upload? > > Thanks > E. Keith Dodd > Wings of Eagles Services > www.wingserv.com > > > - > [This E-mail scanned for viruses by declude AntiVirus Software] > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4