[Zope] uploading images?

Dieter Maurer dieter@handshake.de
Tue, 27 Aug 2002 22:28:27 +0200


3205 5361 1215 9784 writes:
 >   i want to make a form where i can upload images...
 > 
 >   how do i get the image data? (content type, size, data, etc)
Apparently, you do not like searching the mailing list archives...

  This question came up several times.

  Uploaded files are "ZPublisher.HTTPRequest.FileUpload" instances.
  They behave like files with a few extra methods.
  Look there, how to access "Content-Type".

  It is not trivial to find the size of the object.
  You must use the "seek" and "tell" methods of file objects.
  Look at the Python Library Documentation, for details.


Dieter