[Zope] Check uploaded file for valid contents

Jerome Alet alet@librelogiciel.com
Tue, 29 Oct 2002 22:38:56 +0100


On Tue, Oct 29, 2002 at 10:32:53PM +0100, Andreas Tille wrote:
> 
> I wonder if there is an elegant method to check a file which is intended
> to be stored as (Ext)File in the ZODB according to the validity of its
> contents.  The reason is thatr I have to store some PDF files but I have
> users who do not really know the difference between DOC and PDF.  I want
> to refuse DOCs (or any other non-PDF) to enforce users to upload just PDF.

check the content_type of the object if possible.

application/pdf is for ... PDF 

IIRC

bye,

Jerome Alet