hi!! thank you for you reply. Infact i changed the content-type to text/xml. Eventhough the content_type of the file changes, it still remains an "Image" and that gives me problems. Can i change the type of the file using some api function? It is like changing the type from dtml-method to zpt file. similarly from Image to ordinary "file". Regards, R K --- Jonathan Hobbs <toolkit@magma.ca> wrote:
From: "R Karthick" <catchkarthick@yahoo.com>
I upload images in to a ftp upload enabled folder. My task is to base64 encode the images and put it into another directory. I base64 encode the files using the external method. When i upload it, ZOPE takes the default type as image. Now if i rename the file into a *.dat file, then the encoding works.
Now can i change the type of the object from "image" to ordinary "file" from a script python.
You can change the content type when you add the object:
contentType = 'image/jpeg' folder.manage_addFile(id=thisId, file=filedata, title=afile, content_type=contentType)
You can set contentType to any valid MIME type.
HTH
Jonathan
===== with "freedom" comes great responsibilities __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail