[Zope] DTML syntax

Kevin Dangoor kid@kendermedia.com
Wed, 25 Aug 1999 17:15:27 -0400


-----Original Message-----
From: Tim Wilson <wilson@chemsun.chem.umn.edu>
To: Zope Listserv <zope@zope.org>
Date: Wednesday, August 25, 1999 5:05 PM
Subject: [Zope] DTML syntax


>Hi everyone,
>
>I can't find the answer to this anywhere.
>
>I've added a file object to my ZODB. The file is a PDF file that I'd like
>to make available for download. A couple questions:
>
>1. How do the options of storing these PDFs in the ZODB compare to keeping
>them separately where people can use my ftp server to get them? I think
>there will initially be < 20MB of files.

It's probably less headache for you to keep them in the ZODB... and you
could make the links appear automatically if the docs are there...

>2. What DTML syntax would I use to create a link to this PDF file so it
>can be downloaded? I've tried some different things, but none work.

You should be able to just use the url of the object. To come up with this
programmatically, you could do:
<a href="<dtml-var "fileob.absolute_url()">">Download the PDF</a>

Kevin