[Zope] Mime type for PDB files

Andreas Jung lists at zopyx.com
Wed Nov 1 12:32:23 EST 2006



--On 1. November 2006 04:56:28 +0000 Alan <alanwilter at gmail.com> wrote:

> Hi List!
>
> I have some lines in a ZPT file creating a link to PDB files in a
> LocalFS folder:
>
> <span tal:repeat="item python: options.get('pdbsw','null')">
> <tr><td>
> <a tal:attributes="href python:
> container.JOBS.absolute_url()+'/'+item+'.pdb'" tal:content="python:
> item+'.pdb'">get file</a>
> </td><td>
> </span>
>
> It works fine expect for one thing. When clicking at the link, my
> browser (Safari), thinks my PDB file has mime type text.
>
> Is it possible to define the mime type (chemical/x-pdb) for my linked
> files in Zope?
>

For 'File' instances you can set the 'content_type' property within the ZMI.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20061101/cbbde8ee/attachment.bin


More information about the Zope mailing list