[Zope] content type of file reverts from text/html to application/octet-stream

Justin Olmanson audiotap77004 at hotmail.com
Fri Oct 12 20:51:31 EDT 2007


Hi,


I have a story writing application. Users click a creat story button and it 
creates a file like so...

   the_folder.manage_addFile(the_id, file="<html></html>", title="", 
precondition="", content_type="text/html")

This works fine the file is created and is of the content type   text/html

However when the user edits the story using epoz and saves it the file 
content type changes to application/octet-stream      here is the update 
script called from a dtml method called 'edit' with the url being 
http://websiteaddress.com/storyid/edit

def changeFileContent(ht):

     ''' this function updates the object contents on which it is called '''

     htPlus = "<html><head><title>" + title1 + "</title></head><body>" + ht 
+ "</body></html>"

     context.manage_upload(htPlus)



any ideas?

thanks

_________________________________________________________________
More photos; more messages; more storage—get 5GB with Windows Live Hotmail. 
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507



More information about the Zope mailing list