[Zope] Adding an ExtFile from a web page

Arno Gross arno.gross@consotec.de
Thu, 10 May 2001 08:49:19 -0100


I used only ExtImage with the following snippet:


          <dtml-let ret="manage_addProduct['ExtFile'].manage_addExtImage(title=_['PICTURE.TITLE'],
                                                               descr=_['PICTURE.DESCR'],
                                                               file=_['PICTURE.FILE'],
                                                               content_type='',
                                                               create_prev=create_prev,
                                                               maxx=maxx,
                                                               maxy=maxy,
                                                               ratio=ratio,
                                                               permission_check=permission_check,
                                                               REQUEST=REQUEST)">
                                                               
For adding an ExtFile object you have to use:

manage_addExtFile(self, id='', title='', descr='', file='', content_type='', permission_check=0, REQUEST=None)

Best regards
   Arno

On Thu, 10 May 2001, Andrei Cenja wrote:
> 
> Hello !
> 
> I'm trying to use the ExtFile product to upload files into the filesystem 
> of the machine running Zope.
> 
> I previously used manage_addFile to upload files (from a web page, not the 
> manager) into the ZODB like this:
> 
> context.manage_addProduct['OFSP'].manage_addFile(id=<>, title=<>, file=<> )
> 
> and now I would like to do something equivalent with manage_addExtFile; 
> however, I constantly receive a key error
> 
> Error Type: KeyError
> Error Value: standard_html_header
> 
> It seems that it's not any of "my" dtml-vars, but rather my incorrect use 
> of the ExtFile object, and being very new at this, I'm not making much out 
> of reading the code.
> 
> Could you please give me a hint on how can be a file uploaded from a web 
> page with the ExtFile object ?
> 
> Thank you !
> 
> Andrei Cenja, Bucharest, Romania.

----------------------------------------
Content-Type: text/html; name="unnamed"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------