[Zope] Still Problem with LocalFS

Jorgen Gardsted Jorgensen gardsted@iname.com
Fri, 14 Jul 2000 01:00:30 +0200


I have had a similar problem.
My solution is based on an external method.

I have a folder named localFS with
1) a Local File System named images pointing somewhere in file system.
2) an ExternalMethod called addFile looking like this:

def addFile(self, file, fullpath):
 outfile = open(fullpath, 'w')
 outfile.write(file.read())
_______

the Upload form has this input:

<INPUT TYPE="file" NAME="file" SIZE="25" VALUE="">
________

the action-method  looks somewhat like this.

<dtml-call
"REQUEST.set('fullpath',localFS.images.getProperty('basepath'))">
<dtml-call "REQUEST.set('imgresult',localFS.addFile(file,fullpath))">
________

This is all very new to me. The file is there, and I can read it, so it
should work, I guess.
There's no error checking though, so be careful.
I also intend to let the external method return something meaningful
instead of None.

best regards Jørgen