[Zope] get full pathname file from form

Michael Bleijerveld michael at bleijerveld.nl
Tue Aug 19 18:16:02 EDT 2003


It's takes more than 40 seconds to check a filesize of a 10 MB file.

----- Original Message ----- 
From: "Andreas Jung" <andreas at andreas-jung.com>
To: "Michael Bleijerveld" <michael at bleijerveld.nl>; <zope at zope.org>
Sent: Tuesday, August 19, 2003 5:05 PM
Subject: Re: [Zope] get full pathname file from form


> len() on a string of 10MB should be done in less than a second.
>
> -aj
>
> --On Dienstag, 19. August 2003 17:01 Uhr +0200 Michael Bleijerveld
> <michael at bleijerveld.nl> wrote:
>
> > Hi Andreas,
> >
> > This doesn't work for me. When I want to get the filesize of a large
file
> > (10 MB or more) I takes a long time to get the result.
> > Therefore I want to use os.path.getsize.
> >
> > Michael
> >
> > ----- Original Message -----
> > From: "Andreas Jung" <andreas at andreas-jung.com>
> > To: "Michael Bleijerveld" <michael at bleijerveld.nl>; <zope at zope.org>
> > Sent: Tuesday, August 19, 2003 4:51 PM
> > Subject: Re: [Zope] get full pathname file from form
> >
> >
> >> call len() on the body of the received data. Except  MSIE ,you will you
> >> receive
> >> the filename and not the complete path.
> >>
> >> -aj
> >>
> >> --On Dienstag, 19. August 2003 16:44 Uhr +0200 Michael Bleijerveld
> >> <michael at bleijerveld.nl> wrote:
> >>
> >> > Hi all,
> >> >
> >> > I want to upload a file with this form.
> >> >
> >> > <FORM ACTION="upload_file" METHOD="POST"
ENCTYPE="multipart/form-data">
> >> >
> >> > <INPUT TYPE="FILE" NAME="FILE" > <INPUT TYPE="SUBMIT" VALUE="Upload"
> >> > NAME="ACTION" >
> >> >
> >> > </FORM>
> >> >
> >> > To check the size with os.path.getsize(file) I need the filename with
> > the
> >> > whole path.
> >> >
> >> > How can I get this from the form variables ?
> >> >
> >> > Regards.
> >> >
> >> > Michael
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > Zope maillist  -  Zope at zope.org
> >> > http://mail.zope.org/mailman/listinfo/zope
> >> > **   No cross posts or HTML encoding!  **
> >> > (Related lists -
> >> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> >>
> >>
> >>
> >>
> >
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope at zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
>
>
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>





More information about the Zope mailing list