Follow-up yesterday's thread of trying to screen files before uploading with
cffile:

Just did some comparing of the MX behavior with CF5, to see if could glean
any valuable info from initial form before uploading using cffile using CF5:

If did a cfdump of the form (initial form with file to upload), in MX,
regardless the type of file to be uploaded, it showed the form field value
as
that temporary file (.tmp) --nothing to suggest the actual extension, etc.
(Will probably use a Javascript routine as a partial check.)

In CF5, however, if the file to be uploaded was something like .jpg, .doc,
it showed in dump as temporary files (.tmp).
But for things like .txt or .htm, it showed the total rendered file in dump!
Not the
name--the actual processed page!

Gotta get some productive work accomplished. Could investigate this forever!

E. Keith Dodd
Wings of Eagles Services
www.wingserv.com

----- Original Message -----
From: "E. Keith Dodd" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 1:52 PM
Subject: Re: Screening files before CFFile upload


> Thanks, interesting article.
> That would allow examination of size.
>
> I did a cfdump of cgi, but don't see anything that would give me anything
> about extension of the actual file. Gives content-type of
> multipart/form-data etc.
> Tried dump of form and only gives the .tmp file.
>
> Your suggestion takes care of one concern. I'm doubting can do things like
> the original file's actual extension, on the server-side, at least.
> Javascript, perhaps, but could work around.
>
> Thanks
> ----- Original Message -----
> From: "Bryan F. Hogan" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 29, 2003 1:38 PM
> Subject: 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/[email protected]/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\neotemp\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
                                

Reply via email to