GNOME Bugzilla – Bug 309980
MetaWeblog.uploadImage should use <base64> not <string>
Last modified: 2010-03-04 20:22:07 UTC
Please describe the problem: Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Oops, sorry about the blank message, I slipped and hit enter. The MetaWeblog.uploadImage implementation sends the content as a <string> containing the base64-encoded content of the image, rather than the XML-RPC type of <base64> that should be used. This causes problems for my blog which expects the content to be in a <base64> type. To send the right type use: content['bits'] = xmlrpclib.Binary(file_contents)
I confirm this bug: on lifetype system (using metaweblog api) the images are not encoded correctly. With the change indicated in the previous comment (to be applied in the file MetaWeblog.py) all works fine.
Matthew's fix works for me with Wordpress.
Created attachment 155260 [details] [review] Fixes MetaWeblog image upload by changing data encoding to binary.