12 Jul
2004
12 Jul
'04
1:10 p.m.
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