[Zope] Storing files externally

Alexander Limi alexander@limi.net
Fri, 17 Dec 1999 22:47:41 +0100


Zopistas,

I'm trying to store files that are submitted from a form on the local
filesystem, and not in the ZODB. First, I thought I could use the LocalFS
product, but this is read only, so no dice.

Then I tried to implement the things I found in the "Howto store files
externally"-howto. I'm almost there (after some fiddling around, the howto is a
bit lacking) but I get errors.

When I try to add an object of the class "myFileClass", I get the following:

"Zope has encountered an error while publishing this resource.
Error Type: NameError
Error Value: cookId"

The external method "cookId" is located in the ZClass. Traceback below.

Shouldn't it be easy to store files outside the ZODB? I find these methods a
bit cumbersome.

Alexander Limi.
http://mp3.no

Traceback (innermost last):
  File D:\Programs\Zope\lib\python\ZPublisher\Publish.py, line 214, in
publish_module
  File D:\Programs\Zope\lib\python\ZPublisher\Publish.py, line 179, in publish
  File D:\Programs\Zope\lib\python\Zope\__init__.py, line 202, in
zpublisher_exception_hook
    (Object: RoleManager)
  File D:\Programs\Zope\lib\python\ZPublisher\Publish.py, line 165, in publish
  File D:\Programs\Zope\lib\python\ZPublisher\mapply.py, line 160, in mapply
    (Object: myFileClass_add)
  File D:\Programs\Zope\lib\python\ZPublisher\Publish.py, line 102, in
call_object
    (Object: myFileClass_add)
  File D:\Programs\Zope\lib\python\OFS\DTMLMethod.py, line 145, in __call__
    (Object: myFileClass_add)
  File D:\Programs\Zope\lib\python\DocumentTemplate\DT_String.py, line 502, in
__call__
    (Object: myFileClass_add)
  File D:\Programs\Zope\lib\python\DocumentTemplate\DT_With.py, line 133, in
render
    (Object: myFileClass.createInObjectManager(cookId(REQUEST['file']),
REQUEST))
  File D:\Programs\Zope\lib\python\DocumentTemplate\DT_Util.py, line 335, in
eval
    (Object: myFileClass.createInObjectManager(cookId(REQUEST['file']),
REQUEST))
    (Info: REQUEST)
  File <string>, line 0, in ?
NameError: (see above)