Hi everybody,

i have created a ticket for this new issue. https://svn.nuxeo.org/trac/pub/ticket/1840
I have included a 'diff -u'. if you give me credentials in subversion, i could commit it.



El sáb, 28-04-2007 a las 20:45 +0200, Florent Guillaume escribió:
Hi,

If you don't mind, could you put this in a new issue in the  
bugtracker? Otherwise it might get lost, and the bugtracker is where  
issue management happens.

Thanks,
Florent

On 12 Apr 2007, at 16:33, Michael Schulz wrote:

>
> Hi Florent, Jose,
>
> I am also looking at this file for a while and found that it always  
> creates
> files, even if you upload images, a zope file object is created.
>
> This is the corresponding patch, to the createFile.py of cps 3.4.3,  
> without
> jose's patch:
>
> ============
> --- ../Products-CPS-platform-3.4.3/CPSDocument/createFile.py   
> 2007-04-10
> 10:52:10.000000000 +0200
> +++ createFile.py 2007-04-12 14:07:08.000000000 +0200
> @@ -25,7 +25,7 @@
>  from logging import getLogger
>
>  from Products.CMFCore.utils import getToolByName
> -from OFS.Image import File
> +from OFS.Image import File, Image
>  from AccessControl import ModuleSecurityInfo
>  from zipfile import ZipFile, BadZipfile
>  from StringIO import StringIO
> @@ -107,7 +107,10 @@
>
>          # create file to attach to document
>          data = "">
> -        file_to_attach = File(path_filename, path_filename, data)
> +        if ptype in ['Image']:
> +            file_to_attach = Image(path_filename, path_filename,  
> data)
> +        else:
> +            file_to_attach = File(path_filename, path_filename, data)
>          if mimetype and file_to_attach.content_type != mimetype:
>              logger.debug('Fixing mimetype from %s to %s',
>                           file_to_attach.content_type, mimetype)
> ==========
>
> Cheers, Michael
>
> -----------------------------
> Michael Schulz
>
> in medias res GmbH
> In den Weihermatten 66
> D-79108 Freiburg
> +49 761 5569595
>
>
  
--

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

Reply via email to