[Product-Developers] Re: dexterity NamedBlobFile: file size limit?

Martin Aspeli optilude+lists at gmail.com
Thu Feb 18 12:07:05 UTC 2010

Kees Hink wrote:
> Is there a way to set a limit on the allowed file size NamedBlobFile fields in
> dexterity content types?

I'm sure there's a way, but you'll be the first to try it. :)

> The list of field properties on
> http://plone.org/products/dexterity/documentation/manual/developer-manual/reference/fields
> doesn't list anything.
> I've also browsed through plone.formwidget.namedfile.widget.NamedFileWidget and
> z3c.form.browser.FileWidget, but found nothing there.
> Is this something that currently can't be done?

I think you just want to register a validator on the field that checks 
the length of the value. It may be interesting to try to bake this into 
the field as a settable property (by implementing IMinMax). Patches 
welcome. ;)


Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

More information about the Product-Developers mailing list