[Zope] PUT_factory and File object?

2006-08-10 Thread Eric Fernandez
Hi, I am trying to upload text files as File objects instead of DTML documents to avoid HTML escaping. What is the type of the File object in Zope ? The example in the Zope book are ZopePageTemplate and PythonScript objects,, but I just want a File object. This does not work: def

Re: [Zope] PUT_factory and File object?

2006-08-10 Thread Eric Fernandez
Eric Fernandez wrote: Hi, I am trying to upload text files as File objects instead of DTML documents to avoid HTML escaping. What is the type of the File object in Zope ? The example in the Zope book are ZopePageTemplate and PythonScript objects,, but I just want a File object. This does not

Re: [Zope] PUT_factory and File object?

2006-08-10 Thread Stefan H. Holek
On 10. Aug 2006, at 13:52, Eric Fernandez wrote: def PUT_factory( self, name, typ, body ): ob = None if typ.startswith('text'): ob = File(name, '', body, content_type=typ) return ob However, I cannot upload jpg files anymore... What am I doing wrong there? Stefan

Re: [Zope] PUT_factory and File object?

2006-08-10 Thread Eric Fernandez
Stefan H. Holek wrote: On 10. Aug 2006, at 13:52, Eric Fernandez wrote: def PUT_factory( self, name, typ, body ): ob = None if typ.startswith('text'): ob = File(name, '', body, content_type=typ) return ob However, I cannot upload jpg files anymore... What am I doing

Re: [Zope] PUT_factory and File object?

2006-08-10 Thread Dieter Maurer
Eric Fernandez wrote at 2006-8-10 12:52 +0100: ... from OFS.Image import File def PUT_factory( self, name, typ, body ): if typ.startswith('text'): ob = File(name, '', body, content_type=typ) return ob However, I cannot upload jpg files anymore... What am I doing wrong there?