[Zope] upload LocalFS with python script

Dmitry Dembinsky dmitry@deluxoft.com
Fri, 18 Jul 2003 22:26:33 +0200


> When uploading a file with a pythonscript containing the 
> following statements the size of the uploaded file is 0.
> 
> file = container.REQUEST.form['FILE']
> context.manage_addProduct['LocalFS'].manage_upload(file)
> 
> What is the problem ?

Does your HTML form contain a correct encoding type?

(If you upload a file, your FORM tag should specify enctype attribute:

<form action="..." enctype="multipart/form-data">
  ...
  <input type="file" ...>

)

Regards,
Dmitry