[Zope-CMF] Anyone Using ExtFile?

Tres Seaver tseaver@zope.com
14 Oct 2002 10:11:12 -0400


--=-ky0Obnuo3v8GJJUtGLcQ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Sun, 2002-10-13 at 23:38, Carl Rendell wrote:
> Wondering if anyone is using the zope ExtFile product with recent 
> versions of CMF (1.3) and Zope (2.5.1+), and if so... Are there any 
> issues that have come up when using it. Also are there any 
> alternatives that I've missed?
> 
> I'm looking at providing extranet functionality for different 
> binary file types, and I'd prefer _not_ to have these binaries in 
> the ZODB. I like the relationship of one catalog entry per file, 
> and the ExtFile seems to fit that profile. Of course the product 
> will have to be massaged to work with CMF.

Jeff Sasmor's CMFOptions product made an early pass at that
"masssaging";  the product needs a patch to work with CMF 1.3 (I'm
attaching the patch):

CMFOptions homepage:

  http://www.netkook.com/Members/jeff/cmfo

My patch (also attached):

 
<http://www.netkook.com/Members/tseaver/CMFOptions-CMF-1.3-compatible.diff/view>

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com

--=-ky0Obnuo3v8GJJUtGLcQ
Content-Disposition: attachment; filename=CMFOptions-CMF-1.3-compatible.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; name=CMFOptions-CMF-1.3-compatible.diff;
	charset=ISO-8859-1

diff -wru CMFOptions-1.2/Blark.py CMFOptions-patched/Blark.py
--- CMFOptions-1.2/Blark.py	Tue Jan 29 16:22:10 2002
+++ CMFOptions-patched/Blark.py	Fri Oct 11 13:31:13 2002
@@ -26,7 +26,7 @@
 from Products.CMFDefault.Document import Document,addDocument=0D
 from Products.CMFCore.PortalFolder import PortalFolder=0D
 from Products.CMFCore.CatalogTool import CatalogTool=0D
-from Products.CMFCore.utils import modifyPermissionMappings=0D
+from Products.CMFCore.utils import _modifyPermissionMappings
 from Products.CMFCore.MembershipTool import MembershipTool=0D
 from Products.CMFCore import utils=0D
 from AccessControl import ClassSecurityInfo  =20=0D
@@ -40,7 +40,7 @@
=20=0D
 # Factory type information -- makes Blark objects play nicely=0D
 # with the Types Tool (portal_types)=0D
-factory_type_information =3D {'id': 'Blark',=0D
+factory_type_information =3D ({'id': 'Blark',
      'content_icon': 'blark_icon.gif',=0D
      'meta_type': 'Blark Weblog',=0D
      'description': ('A blark weblog allows a user to create a personal we=
blog or a public news log'),=0D
@@ -70,7 +70,8 @@
=20=0D
=20=0D
                  ),                     # End Actions=0D
-     }=0D
+     },
+)
=20=0D
=20=0D
 widthSettings =3D {'4060':('40%','60%'),'5050':('50%','50%'),'6040':('60%'=
,'40%'),=0D
@@ -627,8 +628,8 @@
         str_id =3D 'BLARKENTRY_' + str_id + '_' + logtime  =20=0D
=20=0D
         #either one of these works=0D
-        #self.invokeFactory('Document', str_id, title=3Dself.defaultArticl=
eTitle)=0D
-        addDocument(self,str_id,self.defaultArticleTitle)=0D
+        self.invokeFactory('Document', str_id, title=3Dself.defaultArticle=
Title)
+        #addDocument(self,str_id,self.defaultArticleTitle)
=20=0D
         ob =3D self._getOb(str_id, self)=0D
         if ob is self:=0D
diff -wru CMFOptions-1.2/CMFExtFile.py CMFOptions-patched/CMFExtFile.py
--- CMFOptions-1.2/CMFExtFile.py	Tue Jan 29 16:22:11 2002
+++ CMFOptions-patched/CMFExtFile.py	Fri Oct 11 13:12:22 2002
@@ -126,7 +126,7 @@
=20=0D
 # Factory type information -- makes CMFExtFile objects play nicely=0D
 # with the Types Tool (portal_types)=0D
-factory_type_information =3D  {'id': 'CMFExtFile',=0D
+factory_type_information =3D  ({'id': 'CMFExtFile',
      'meta_type': 'Portal External File',=0D
      'description': ('Arbitrary-content Files that are stored in the files=
ystem '=0D
                      'rather than in the Zope Database.'),=0D
@@ -149,7 +149,8 @@
             'permissions': ('Modify portal content',)},=0D
        =20=0D
             )=0D
-       }=0D
+       },
+)
    =20=0D
=20=0D
=20=0D
diff -wru CMFOptions-1.2/CMFExtImage.py CMFOptions-patched/CMFExtImage.py
--- CMFOptions-1.2/CMFExtImage.py	Tue Jan 29 16:22:10 2002
+++ CMFOptions-patched/CMFExtImage.py	Fri Oct 11 13:13:07 2002
@@ -131,7 +131,7 @@
=20=0D
 # Factory type information -- makes CMFExtImage objects play nicely=0D
 # with the Types Tool (portal_types)=0D
-factory_type_information =3D  {'id': 'CMFExtImage',=0D
+factory_type_information =3D  ( {'id': 'CMFExtImage',
      'meta_type': 'Portal External Image',=0D
      'description': ('External Images are Images that are stored in the fi=
lesystem '=0D
                      'rather than in the Zope Database.'),=0D
@@ -150,7 +150,8 @@
                   'permissions': ('Modify portal content',)},=0D
=20=0D
                  ),                     # End Actions=0D
-     }=0D
+     },
+)
    =20=0D
=20=0D
=20=0D
diff -wru CMFOptions-1.2/__init__.py CMFOptions-patched/__init__.py
--- CMFOptions-1.2/__init__.py	Tue Jan 29 16:22:10 2002
+++ CMFOptions-patched/__init__.py	Fri Oct 11 13:14:19 2002
@@ -117,5 +117,7 @@
         content_types =3D (CMFExtImage.CMFExtImage,CMFExtFile.CMFExtFile,B=
lark.Blark),=0D
         permission =3D 'Add portal content',=0D
         extra_constructors =3D (CMFExtImage.addCMFExtImage,CMFExtFile.addC=
MFExtFile,Blark.addBlarkFolder),=0D
-        fti =3D (CMFExtImage.factory_type_information,CMFExtFile.factory_t=
ype_information,Blark.factory_type_information),=0D
+        fti =3D (CMFExtImage.factory_type_information
+              +CMFExtFile.factory_type_information
+              +Blark.factory_type_information),
         ).initialize(context)=0D

--=-ky0Obnuo3v8GJJUtGLcQ--