[Zope] How to stop users uploading large images
Steve Alexander
steve@cat-box.net
Tue, 25 Apr 2000 10:28:51 +0100
Hi Folks,
I want to allow ordinary, low-privalidged but non-anonymous users of my
site to upload small images.
I can use PIL to scale images that are slightly too large. However, I
want to stop users abusing the system by uploading 100MB images to see
if it will crash the system.
What is the best way of doing this?
Can I modify the _read_data() method of lib/python/OFS/Image.py to read
some kind of maximum-size attribute, and abort uploads that exceed that
size?
Alternatively, perhaps this is something I don't need to worry about.
Maybe the ZODB has a graceful failure mode on extra-large uploads.
--
Steve Alexander
Cat-Box limited