[Zope] Content-Type missing for uploads?
Loren Stafford
lstafford@morphics.com
Thu, 31 May 2001 19:01:02 -0700
Here's some code I found on my site:
<dtml-boundary type_expr="getMimeType(CVfile)"
name_expr="uploadFileName(CVfile.filename)"
disposition=attachment encode=base64>
getMimeType(UploadFileObject) seems to be the trick.
-- Loren
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Alex
> Sent: Thursday, May 31, 2001 17:43
> To: zope@zope.org
> Subject: [Zope] Content-Type missing for uploads?
>
>
> How can I get the Content-Type of a file that has been uploaded
> with a form?
>
> example:
>
> <form method="post" enctype="multipart/form-data">
> <input type="file" name="myfile">
> <input type="submit">
> </form>
>
> when you upload a file with this form, the browser sends the
> Content-Type of
> "myfile" , the question is: How can I get that Content-Type
> information from
> zope?
>
> By the way, it's not REQUEST.CONTENT_TYPE, as this is set to
> multipart/form-data.
>
> any ideas??
> Thanks
>
> Alex
>
>
>
> _______________________________________________
> 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 )
>