[Zope] wrong url in localfs

J Cameron Cooper jccooper@jcameroncooper.com
Wed, 16 Jul 2003 18:36:45 -0500


>
> When using <td><a href="&dtml-basepath;/<dtml-var id>"><dtml-var 
> id></a></td> the URL is like file:///c:/temp/admin/test.pdf.
>  
> I try to open the file but without success. What is wrong with the url 
> reference ?

It's a local file URL, and relative to the server's filesystem, not its 
public resources. If and only if you're on the server's console will 
that work. You must use a web-accessible URL, which means relative to 
the Zope tree.

If you're in a page in the same folder as the file, simply use the id as 
the (relative) reference. If not, you can use the object's absolute_url 
property.

          --jcc