[Zope] verifying a file upload

iap@y2fun.com iap@y2fun.com
Wed, 5 Dec 2001 12:56:16 +0800


how about check the filename?
<dtml-if  "REQUEST['file'].filename[-3:]=='gif'">
<dtml-elif  "REQUEST['file'].filename[-3:]=='jpg'">
</dtml-if>
----- Original Message -----
From: "Steven Turoff" <steveturoff@home.com>
To: <zope@zope.org>
Sent: Wednesday, December 05, 2001 11:57 AM
Subject: [Zope] verifying a file upload


> Greetings,
>
> I have a form which has a file upload field. If the user uploads an image,
> I want to create an image object. How can I check to see if the user
> uploaded a gif or jpg?
>
> Thanks,
>
> Steve
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>