[Zope] Fwd: Restriction on file upload sizes

Thomas Guettler zopestoller@thomas-guettler.de
Fri, 25 Jan 2002 14:57:24 +0100


Uwe Seithe wrote:

>This is a forwarded message
>From: Uwe Seithe <internet@seithe.de>
>To: webmaster@zope.org <webmaster@zope.org>
>Date: Friday, January 25, 2002, 4:14:06 AM
>Subject: Restriction on file upload sizes
>
>===8<==============Original message text===============
>Hello webmaster,
>
>I'm a Zope Newbie, and very interested in a
>
>HOWTO about that stuff.
>
>I need a Restriction on file upload sizes for
>my own server too.
>
Have a look at Image.py: (Which contains the class File)
    def __init__(self, id, title, file, content_type='', precondition=''):
        self.__name__=id
        self.title=title
        self.precondition=precondition
      
        data, size = self._read_data(file)
        content_type=self._get_content_type(file, data, id, content_type)
        self.update_data(data, content_type, size)

There you have the size. One way would be that you write a python 
product which subclasses
File.

thomas