Hi!
Thanks Martijn and Matt for your ideas!
@Matt: can you explain with more detail the question about REQUEST.response.write()? If the written content is as long as a file like prototype is not a very heavy solution?
The contents of the zexp file are only js files and images (static content) and I'm using Zope2
What about the functionality of the freemind view? What do you think about?
Thanks!
Hi,
This sounds like the same problem I presented earlier. Are you using zope
2.x? If so, then it will only take you ~30 minutes to code something that
makes use of REQUEST.response.write(). That's what I ended up doing; I
wrote a simple class that would mount a directory on the file system and
just serve the files that are in that directory. If you make use of
globals()["__file__"], you can make the class independent of absolute
locations.
If you are using zope 3 (I'm not sure if you can easily get this
functionality out of five + zope2.x, since this deals with the publisher...
someone else would have to answer that), look at this site:
http://apidoc.zope.org/++apidoc++/Book/zopepublisherhttpresults.txt/show.htm
l
Basically, it appears you can just return a file reference and let the
publisher deal with the rest.
A filesystem-based solution, as opposed to a ZODB way of doing this sort of
thing, seems to be the best way to go as far as I'm concerned.
If you are, indeed, using zope2.x , and want to go the response.write() route
look at OFS/Image.py for an example of the serving logic if you want to
avoid putting everything in memory.
There may be better ways to do this sort of thing, but at least this is one
way of going about it that worked nicely for me!
-Matt
-----Original Message-----
From: zope-bounces@zope.org [mailto: zope-bounces@zope.org] On Behalf Of
Garito
Sent: Friday, January 11, 2008 6:33 AM
To: Zope user list
Subject: [Zope] The best way
Hi, all!
If you have download the ZSM product you could see I put on it a zexp
file with prototype and some other js file and a css file plus images
This was only a prototype solution to bring you the chance to see how
my ideas are but I think this is not a definitive solution
Now my question:
Which is the best zope way to serve this kind of files trying to avoid
any other product dependence?
Thanks a lot!
--
Mis Cosas
http://blogs.sistes.net/Garito
_______________________________________________
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 )