[Zope] Could this be what you want? [Was: Looking for variation of ExternalFile product]

Stefan H. Holek stefan@epy.co.at
Mon, 7 Apr 2003 20:48:04 +0200


Should work with files too, yes. The method for ExtFiles is called 
link(). There also is a static_url() method that will return the Zope 
or static URL depending on whether EXTFILE_STATIC_PATH is set.

It's not clear to me why you want to redirect though. The idea is to 
write URLs with static paths into your links and tags. 
ExtFile.index_html() will always return the file's content via Zope. I 
currently think this is good, and it seems necessary for b/w 
compatibility anyway.

Try

   <tal:tag replace="structure file/link" />

or

   <a tal:attributes="href file/static_url" tal:content="file/title"> 
</a>

Stefan



On Montag, Apr 7, 2003, at 19:19 Europe/Vienna, Oliver Bleutgen wrote:

> Stefan H. Holek wrote:
>> Some time ago I have modified ExtFile to allow for 3) as well. And 
>> now I've even published it ;-).
>> <http://www.zope.org/Members/shh/ExtFile/>
>
> Cool, open source development on demand ;), nice!
> One question though, from the description I gather that you have 
> overriden ExtImage's tag method, have you also modified ExtFile's 
> __call__ method (or whatever causes the serving of the file content, 
> haven't looked at the source)?
> If not, are you interested in a patch? (Ok, two questions).
>
> I need that functionality for files, not images, and think that 
> returning a redirect with mangling in EXTFILE_STATIC_PATH would do the 
> trick.
>
> Tell me what you think, and I'll try to make that a bit more 
> customizable if you want to incorporate it.
>
> cheers,
> oliver
>
>