[Zope] filter_content_type / allowed_content_types query

David Pratt fairwinds at eastlink.ca
Sat May 21 11:36:59 EDT 2005


I am creating a CMF product.  It is simple and will only have an id, 
title, description and the ability to upload its content.  I am wanting 
to restrict the files uploaded to a certain mime type, specifically 
.txt files (plain text).

I see many products like this:

  'filter_content_types' : 0,
  'allowed_content_types': (),

but can't seem to find an example where it is creating this kind of 
restriction

Can I use filter_content_type and allowed_content_types in this context 
  to help restrict the type (or should I do my check on the file type 
somewhere else (or in addition to something else like discovering the 
mimetype from a method in the mimetypes registry product))?

Regards,
David


More information about the Zope mailing list