[Zope] problems rendering objects stored in the local file system

2005-04-27 Thread Dennis Allison

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?

-- 
Dennis Allison * Computer Systems Laboratory * Gates 227
   * Stanford University *  Stanford CA  94305
   * (650) 723-9213 * (650) 723-0033 fax
   * [EMAIL PROTECTED]
   * [EMAIL PROTECTED]



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] problems rendering objects stored in the local file system

2005-04-27 Thread Andreas Jung

--On Mittwoch, 27. April 2005 19:57 Uhr -0700 Dennis Allison 
[EMAIL PROTECTED] wrote:

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.
The index.html has nothing to do with your stuff in the filesystem. You 
reference
images through an URL in the img src...attribute. And the method or 
whatever
is located behind the URL is in charge to send the image data to the client
(it does not matter where the image is actually stored (filesystem, memory,
moon).  Bascially the method is called (requested) from the client through
HTTP and it has to send the data + the corresponding HTTP header telling the
client: I am an image of type XXX.

-aj



pgpHT4GLaSqFr.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] problems rendering objects stored in the local file system

2005-04-27 Thread Cliff Ford
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.

Cliff
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  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] problems with objects

2000-09-19 Thread Joaldo Junior

It forgives for my English, I am still learning

we go direct to the subject: it would like to know with I I make to
attribuir values of an object SQL Method for the other. Former object
sql_contatos TBL_Contatos.int_id = sql_problemas TBL_Problemas.int_id 

very obliged

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )