[Zope] LocalFS

Paul Zwarts paul.zwarts@oratrix.com
Fri, 23 Feb 2001 14:25:55 +0100


Ah, good. Thank you. You at least confirm my suspicions. But being
'non-(so)-technical' or at a much more basic level than those that can take
stable syntax knowledge for granted, can someone offer me how to write into my
LocalFS mount called AdminImgMnt.

I can easily write a proper image in Zope, but directing through the mount
evades me completely. I would not know where to begin on how to tell
manage_addImage to go through LocalFS.....

The following working line of code drops my image, but now i want it to be
directed to AdminImgMnt which is the LFS mount.... User rights should be okay.
I think Im only missing the syntaxing.

      <dtml-call expr="manage_addImage(_.str(pid) + '.jpg',
REQUEST.form['imgfile'], '')">

My first assumptions were to be

      <dtml-call expr="AdminImgMnt.manage_addImage(_.str(pid) + '.jpg',
REQUEST.form['imgfile'], '')">

or
<dtml-with AdminImgMnt>
      <dtml-call expr="manage_addImage(_.str(pid) + '.jpg',
REQUEST.form['imgfile'], '')">
</dtml-with>

But both just deposit the file locall (in Zope) next to the LocalFS mount. Now
Im just getting confused beyond rationale.....

Thanks as always,
Paz

Jens Vagelpohl wrote:

> This is incorrect. LocalFS also allows you to write files to the directory
> that you are "viewing" through the LocalFS object, provided the user your
> zope process runs under has the privilege to write into that directory.
>
> i know this won't help non-technical people, but i have found the code for
> LocalFS to be very clean, well-written and self-explanatory and have done a
> few python utilities based on it without ever needing more documentation
> than the code itself.
>
> jonothan has put up a page with an overview over LocalFS capabilities right
> here:
>
> http://www.zope.org/Members/jfarr/Products/LocalFS/LocalFS-0.10.1.tgz/info
>
> hope that helps
>
> jens
>
> on 2/23/01 6:22, Cyril Elkaim at cyril.elkaim@free.fr wrote:
>
> >
> >
> >> How do I store a file in LocalFS?
> >
> > Don't. LocalFS is a VIEW of your file system. Simply move your file in
> > the directory managed by LocalFS and you are done.
> >
> >> Cheers and excuse today's hangover moodiness,
> >
> > You're not alone, don't give up :-)
> >
> > Cyril