You have at least two choices:

1. Use apache and don't fetch index.html and the images through zope. Most installations use apache in front of zope, so this is just a matter of rewrite rules.

2. Use an External Method and make each image src attribute a function call, passing the image url as a paramter, for example:

<img src="fetchimage?from=some/place/in/your/file/system"...

If you do that, make sure you include code to check that a malicious user cannot fetch any file from your file system. There have been some recent (this year) posts of example code you can google for.


Dennis Allison wrote:
I am having trouble figuring out how to get Zope to access and render html and images files properly in the following context:

In the local file system (that is, the Linux file system to be explicit) I
have a collection of directories each containing an index.html file
consisting of HTML and a collection of image files (*.jpg, *.gif, *.swf)
referenced by the HTML. From a DTML object in the ZODB, I want to render
the index.html and have it properly access the local image files. Calling the file "index.html" may be a bad name choice because it may be
interpreted especially. In fact, what I really would like to be able to do
is to reference all files relatively and allow internal directories and
the like. We've been using the LocalFS product, mostly with great
success, but this has got me stumped.

Any suggestions? hints? pointers?

Zope maillist -
** No cross posts or HTML encoding! **
(Related lists - )

Reply via email to