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
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to