[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/File - IFile.py:1.8 configure.zcml:1.11

Jim Fulton jim@zope.com
Mon, 11 Nov 2002 16:05:46 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/File
In directory cvs.zope.org:/tmp/cvs-serv21821

Modified Files:
	IFile.py configure.zcml 
Log Message:
Changed to use (single-line) Line field for content type.

Changed to to use an automatically-generated editing form
when the content type begins with "text/".

Added an automatically-generated upload form that is customized with a
class to provide a custom widget (a file widget) for the data. 


=== Zope3/lib/python/Zope/App/OFS/Content/File/IFile.py 1.7 => 1.8 ===
--- Zope3/lib/python/Zope/App/OFS/Content/File/IFile.py:1.7	Wed Sep 11 18:08:35 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/File/IFile.py	Mon Nov 11 16:05:16 2002
@@ -22,7 +22,7 @@
 
 class IReadFile(IFileContent):
     
-    contentType = Zope.Schema.Bytes(
+    contentType = Zope.Schema.Line(
         title = u'Content Type',
         description=u'The content type identifies the type of data.',
         default = 'text/plain',


=== Zope3/lib/python/Zope/App/OFS/Content/File/configure.zcml 1.10 => 1.11 ===
--- Zope3/lib/python/Zope/App/OFS/Content/File/configure.zcml:1.10	Mon Nov  4 17:11:00 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/File/configure.zcml	Mon Nov 11 16:05:16 2002
@@ -14,7 +14,9 @@
 
   <require
       permission="Zope.ManageContent"
-      interface=".IFile.IWriteFile" />
+      interface=".IFile.IWriteFile"
+      set_schema=".IFile.IReadFile"
+      />
 
   <implements interface="Zope.App.OFS.Annotation.IAttributeAnnotatable." />