Actually, this makes me think of an interesting idea. It might be
interesting to create a Servlet Filter that would intercept multi-part
requests on their way to the CFM Servlet. This filter could limit the
size of an upload based on a session variable and more interestingly
could also update a session variable on the progress of the upload.
When the upload is finished it would just pass the request off to the
CFM Servlet and things should work normally from there.

-Matt

On Jan 30, 2004, at 10:45 AM, Matt Liotta wrote:

> You can't achieve that with CF as no information is available about
> uploaded files until the file is finished uploading. You could create a
> Java Servlet that achieved the results you were looking for.
>
> -Matt
>
> On Jan 30, 2004, at 10:25 AM, Burns, John wrote:
>
> > That's basically what I'm trying to do also.  Here's the logic I'm
> > following.  Any server gurus or file upload gurus, please correct me
> if
> > I'm wrong.  I've seen something like this done on another site and
> I'm
> > trying to figure out if I can implement it with cf.
> >
> > 1. A user chooses a file in a form and submits it.
> > 2. I pop open a new window passing the result of cgi.content_length
> and
> > form.filename to the new window (before I do the cffile
> action=""> > > to upload the file)
> > 3. In the pop-up, I do a cfdirectory action="" filter="filename"
> to
> > return the physical file size of the uploaded file.  I then want to
> > display to the user xkb of #cgi.content_length#kb is uploaded.
> > 4. In theory, if I refresh the pop-up every second or two, the user
> can
> > see the progress of the upload.
> >
> > Does that make sense?  Anyone have a better way of doing this?
> >
> > John
> >
> > -----Original Message-----
> > From: Stuart Kidd [mailto:[EMAIL PROTECTED]
> > Sent: Friday, January 30, 2004 10:23 AM
> > To: CF-Talk
> > Subject: Re:Check file size?
> >
> > On the same topic, is there a way of checking the file size before CF
> > uploads?  Otherwise you upload a 1mb file only to find that it's over
> > the limit that you wanted to set (eg. 75kb) causing unnecessary
> > bandwidth use.
> >
> > Can it be done a better way?
> >
> > Stuart
> >
> > ---------- Original Message ----------------------------------
> > From: [EMAIL PROTECTED] (Michael Dinowitz)
> > Reply-To: [EMAIL PROTECTED]
> > Date:  Fri, 30 Jan 2004 10:08:42 -0400
> >
> > >CFDIRECTORY returns the file size when you run it.
> > ><CFDIRECTORY ACTION="" DIRECTORY="d:\htdocs\hof" NAME="qFile"
> > >FILTER="functions.cfm"> File Size = qFile.Size
> > >
> > >>Is there a simple way to check a file's size on Linux using
> > CF5?  CFMX
> > >>6.1 is being  upgraded in the next week or two, so that would work
> > >>also if you have a solution in that direction.  No tags are
> disabled.
> > >>
> > >>John
> > >>
> > >
> >
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to