1 maximvelichko Feb 07, 2008 10:23
3 maximvelichko Feb 15, 2008 09:22
Hello François
I am in doubt... All blogging tools are closed-source, therefore I have no idea what do they do internally and how do they post.
And the codelet I posted is found on Internet as a XML-RPC example. It uses base64 encoding and is _not_ accepted by b2evolution.
Do you have any really working test for testing b2evolution? particulary to upload binary files using metaWeblog.newMediaObject?
Best regards,
Maxim
4 maximvelichko Feb 16, 2008 14:18
OK, I found a bug in my own code (of course!)
b2Evolution contains no bug, indeed.
There is no need to base64_encode the file content before using it inside a XML_RPC_Value:
My code
$data = fread($file, $fs);
$object = chunk_split(base64_encode($data));
fclose($file);
should be replaced with
$data = fread($file, $fs);
$object = $data;
fclose($file);
François, thank you for your hint :-)
When used with popular desktop blogging tools like ScribeFire , Windows Live Publisher and Ecto, the images seem to be saved correctly and display correctly. So I assume the implementation is correct. Or at least it's compatible with what the industry wants if not the spec.