Nuxeo mailing list archives
[CPS-devel] zipfile
jerome prudent
jprudent at gmail.com
Wed Mar 7 14:28:17 CET 2007
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 <jose.jimenez at iavante.es>:
>
> 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
> jose.jimenez at iavantefundacion.com
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nuxeo.com/pipermail/cps-devel/attachments/20070307/e0e0824b/attachment-0001.htm
This list archive provided by Nuxeo, the
leaders of open source ECM.
Check out the Nuxeo 5 open source,
standards-based ECM project.