Well I can’t work this one out.
WordPress supports the metaWeblog API for XML-RPC, it even has an implementation of the newMediaObject method.
However it seems that my python script that is trying to send a Base64 encoded image to the newMediaObject method isn’t working.
Initial investigations looks like the Base64 encoding isn’t being decoded on the other end. Now I’m not sure why that is happening, but it is a bit annoying.
Well, adding a base64_decode to the newMediaObject method in the WordPress xmlrpc.php file seems to have done the trick. Now I just have to find out where the problem lies, either in the WordPress XML-RPC server implementation, or in the Python XML-RPC client implementation.
Next on the list is to try and get the actual XML that is sent from the python script to the server and see what it says about Base64 encoding.


Entries (RSS)