home contents changes options help subscribe edit (external edit)

A very useful ZopeProduct that makes part of your filesystem accessible in the ZODB (Zope Object Database). This is useful for, eg, when you want zope to serve some files that need to stay where they are. It can write files too.

http://www.easyleading.org/Downloads
latest version with zope 2.7, large files and PUT support. Very handy for eg editing po files with ExternalEditor.
http://sourceforge.net/projects/localfs
old home, out of date. Be sure to use the newest version instead! Most support questions and problems with LocalFS can be traced back to people downloading outdated versions.

See also PloneLocalFS, ZopeFileSystem, ExtFile.


comments:

patch needed for zope 2.9 --simon, Tue, 07 Feb 2006 16:08:10 -0800 reply
juergen herrmann writes:

 change the line
 "from OFS.content_types..."
 to
 "from zope.app.content_types"
 in LocalFS.py

LocalFS patch for zope 2.9 works --tschaub, Thu, 02 Nov 2006 15:20:54 -0800 reply
Just to give folks more confidence - the above change (replace "OFS." with "zope.app." in LocalFS.py) is really the only change you need to make LocalFS work with zope 2.9.

Thanks for the patch!

LocalFS patch for zope 2.9 works --larryt, Thu, 02 Nov 2006 17:20:43 -0800 reply

zopewiki@zopewiki.org (tschaub) writes:

Just to give folks more confidence - the above change (replace "OFS." with "zope.app." in LocalFS.py) is really the only change you need to make LocalFS work with zope 2.9.

Thanks for the patch!
forwarded from http://wiki.zope.org/zope2/LocalFS#msg20061102152054-0800@wiki.zope.org

thanks for the timely hint. -l

error uploading file. :( --c, Wed, 04 Jun 2008 05:51:05 -0400 reply
Site Error

An error was encountered while publishing this resource.

ValueError? Sorry, a site error occurred.

Traceback (innermost last):

  • Module ZPublisher.Publish, line 194, in publish_module_standard Module Products.PlacelessTranslationService.PatchStringIO?, line 51, in new_publish Module ZPublisher.Publish, line 146, in publish Module Zope2.App.startup, line 222, in zpublisher_exception_hook Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module OFS.Image, line 62, in manage_addFile Module Products.LocalFS.LocalFS, line 3, in manage_upload Module OFS.Image, line 473, in manage_upload Module OFS.Image, line 433, in update_data * Module ZODB.Connection, line 853, in register

ValueError?: assigning to _p_jar is not supported (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: You are not allowed to access aq_inner in this context)

Troubleshooting Suggestions

  • The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error.

For more detailed information about the error, please refer to the error log.

If the error persists please contact the site maintainer. Thank you for your patience.

re: assigning to _p_jar is not supported --cowtung, Fri, 24 Oct 2008 20:36:55 -0400 reply
Try change the _wrapper_method = blah part to:

_wrapper_method = '''def %(name)s %(arglist)s: """Wrapper for the %(name)s method.""" self._p_oid = self._local_path r = self.__class__.__bases__[-1]?.%(name)s %(baseargs)s try: _save_ob(self, self._local_path) except ValueError?: pass return r '''

formatting of last comment --cowtung, Fri, 24 Oct 2008 20:38:43 -0400 reply
_wrapper_method = '''def %(name)s %(arglist)s: """Wrapper for the %(name)s method.""" self._p_oid = self._local_path r = self.__class__.__bases__[-1].%(name)s %(baseargs)s try: _save_ob(self, self._local_path) except ValueError: pass return r '''

upload form works, python script nor ZMI drop down do not work --relay23, Fri, 31 Oct 2008 13:37:29 -0400 reply
Thanks for all of this info.. Before 2.9 (I was on 2.7 before) I was able to use manage_addImage as well as upload a file from the dropdown into my localfs. I cannot use my python script to do the manage_addImage nor the ZMI drop down to add a file or image anymore. Maybe I need to use a different function in the python script to upload?? Here's the error I get: Error Type: PicklingError? Error Value: Can't pickle : attribute lookup Products.LocalFS.LocalFS.ObjectWrapper? failed

Here's the addImage line I'm using: context.imagesdir.manage_addProduct['OFSP']?.manage_addImage(filename, image_data, '', content_type)

Is OFSP the same thing as the OFS that we are instructed to change to zope.app?



subject:
  ( 28 subscribers )