Re: [Zope] Re: Upload just file headers?

2000-10-12 Thread Paul Winkler
Martijn Pieters wrote: > This doesn't hold true for JPEG's. (snip) Aha, thanks. I'll have to think of a way to deal with this... --PW .paul winkler.. slinkP arts: music, sound, illustration, design, etc. web page: http://www.slinkp.com

Re: [Zope] Re: Upload just file headers?

2000-10-12 Thread Martijn Pieters
On Wed, Oct 11, 2000 at 03:54:17PM -0400, Paul Winkler wrote: > For example, take a .gif or .jpeg file and throw away all > but the first (let's say) 1 kb of the file. > If you try to open this truncated file with an image editor > (gimp, photoshop, whatever) you'll have problems. But useful > inf

Re: [Zope] Re: Upload just file headers?

2000-10-12 Thread Toby Dickenson
On Wed, 11 Oct 2000 15:41:16 -0700 (PDT), knight <[EMAIL PROTECTED]> wrote: >infilename = REQUEST.form['attached_file'].filename # Get filename >infile = REQUEST.form['attached_file'] # Get the file descriptor >myheader = infile.read(500)# Read up to 500 bytes >infile.clo

Re: [Zope] Re: Upload just file headers?

2000-10-11 Thread knight
Actually, I replied on list, but the phenomina of receiving your CC before the list replicated my original reply occured. ;] Knight [EMAIL PROTECTED] On Wed, 11 Oct 2000, Paul Winkler wrote: > Much thanks to Knight and to Peter Bengtsson (who replied > off-list), I know have at least two possib

Re: [Zope] Re: Upload just file headers?

2000-10-11 Thread Tony McDonald
>Much thanks to Knight and to Peter Bengtsson (who replied >off-list), I know have at least two possible avenues to >explore. > >If I ever get this to work, I'll post it! > Please do - we've got people uploading PowerPoints of up to 25-30 Megabytes (record was an attempt at 170 Mb) and we'd like

Re: [Zope] Re: Upload just file headers?

2000-10-11 Thread Paul Winkler
Much thanks to Knight and to Peter Bengtsson (who replied off-list), I know have at least two possible avenues to explore. If I ever get this to work, I'll post it! -- .paul winkler.. slinkP arts: music, sound, illustration, design, etc. web

Re: [Zope] Re: Upload just file headers?

2000-10-11 Thread knight
Here's an idea for you. I use some of the code below in my FileBase product to receive uploads, although, I've added some "code" I think might help you for grabbing just the header. Although I'm not sure if the file descriptor that infile claims from the form has already been loaded into either a

Re: [Zope] Re: Upload just file headers?

2000-10-11 Thread Paul Winkler
Thanks for the reply! Seb Bacon wrote: > > Hmm, well you certainly can't do it at the browser side. Yes, I want to do it on the server. > A well-formed HTTP header should contain a content-length attribute which > you can examine. However, deciding whether to accept the file or not would > I

Re: [Zope] Re: Upload just file headers?

2000-10-11 Thread Paul Winkler
Another way to look at it: I want to start uploading the file, but stop the upload almost immediately - after I've got enough to read the file header, but long before the upload would normally finish. Chris McDonough wrote: > > Paul, > > I'm sorry if I'm dropping context here, but I'm not sure

Re: [Zope] Re: Upload just file headers?

2000-10-11 Thread Chris McDonough
CTED]> To: "Zope mailing list" <[EMAIL PROTECTED]> Sent: Wednesday, October 11, 2000 1:51 AM Subject: [Zope] Re: Upload just file headers? > Still haven't found an answer, after 4 hours searching the > egroups archive. > > Just to clarify: > I need to read the hea

RE: [Zope] Re: Upload just file headers?

2000-10-11 Thread Seb Bacon
Of Paul Winkler > Sent: 11 October 2000 06:52 > To: Zope mailing list > Subject: [Zope] Re: Upload just file headers? > > > Still haven't found an answer, after 4 hours searching the > egroups archive. > > Just to clarify: > I need to read the headers of the file

[Zope] Re: Upload just file headers?

2000-10-10 Thread Paul Winkler
Still haven't found an answer, after 4 hours searching the egroups archive. Just to clarify: I need to read the headers of the files BEFORE I upload the entire file, because the files may be very large and I need to be able to give a warning if the file does not meet certain criteria. Example: a