Not sure at all but maybe you can't use file methode in untrusted code? When
I had to handle files, I used StringIO instead of File successfuly, but
maybe it doesn't fit your need.

2007/3/7, Jose Jiménez López <[EMAIL PROTECTED]>:

Hello everybody,

I am creating a new portal_type for my cps portal. This type will handle a
zip file uploaded by the user. I have created the type correctly, and
assigned as alias of "create_do" an script that will do some operations with
the zip file. In this script, in the datamodel, i have a field called
"'ziparchiveuploader", it contains this: <File at ziparchiveuploader>.

I want to use the python module "zipfile". When i try to open the file
with:

file = zipfile.ZipFile(datamodel['ziparchiveuploader'], 'r')

it returns me this error:

*** AttributeError: seek

I have tried  to open the same zip file with a script in console and its
ok.

Somebody can help me?

Thanks.

  *Jose Jiménez López*
*Becario de Sistemas*
FUNDACIÓN IAVANTE
[EMAIL PROTECTED]
Tel. 958 00 22 63



Este correo electrónico y, en su caso, cualquier fichero anexo, contiene
información confidencial exclusivamente dirigida a su(s) destinatario(s).
Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed
to its adressee(s). Any copy or distribution will have to be authorized by
IAVANTE.




_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel




--
J. Prudent
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to