XML-RPC image upload problem

Found a bug? Tell us!!
Post Reply
dand
Regular
Posts: 18
Joined: Wed Sep 17, 2003 4:23 am
Contact:

XML-RPC image upload problem

Post by dand »

I'm having trouble uploading an image using Kung-Log, a Mac blog app that does the MT API.
When I try to upload an image, it seems the data gets sent but then I get this error:
Query:
{
blogid = 1;
file = {
bits = <ffd8ffe1 18f24578 69660000 4d4d002a 00000008 000d010e 00020000 00200000 00aa
[...]
d69 24096777 20460508 c6d240e7 af27bfe7 5947e276 564094b9 569a77fd 46add15b 50ecca04 430a371e 7239c0f4 a7dcc46e 6c3cd850 23c436c8 aac0ef1d 4103afd7 b54be74b 463a9cd2 69cae7ff d9>;
name = "uploads/Autumn_leaves.JPG";
type = img;
};
password = ******;
username = dand;
}
Response:
{
"/FaultCode" = -65794;
"/FaultExtra" = {
domain = -1;
error = -65795;
msg = "Found unexpected EOF while parsing comment";
};
"/FaultString" = "/CFStreamFault";
"/WSDebugInBody" = "<br />\n<b>Warning</b>: fopen(/home/pubbawup/public_html/dand/blog/uploads/uploads/Autumn_leaves.JPG): failed to open stream: No such file or directory in <b>/home/pubbawup/public_html/dand/blog/serendipity_xmlrpc.php</b> on line <b>315</b><br />\n<br />\n<b>Warning</b>: fwrite(): supplied argument is not a valid stream resource in <b>/home/pubbawup/public_html/dand/blog/serendipity_xmlrpc.php</b> on line <b>316</b><br />\n<br />\n<b>Warning</b>: fclose(): supplied argument is not a valid stream resource in <b>/home/pubbawup/public_html/dand/blog/serendipity_xmlrpc.php</b> on line <b>317</b><br />\n<?xml version=\"1.0\"?>\n<!-- DEBUG INFO:\n\n0 - new XML_RPC_Value(\"1\", 'string') \n1 - new XML_RPC_Value(\"dand\", 'string') \n2 - new XML_RPC_Value(\"******\", 'string') \n3 - new XML_RPC_Value(array('name' => new XML_RPC_Value(\"uploads/Autumn_leaves.JPG\", 'string'),'type' => new XML_RPC_Value(\"img\", 'string'),'bits' => new XML_RPC_Value(base64_decode('\n\t\t\t\t/9j/4RjyRXhpZgAATU0AKgAAAA
[...]
XoZylzWv0KF5pUttMytIX3Z2lAGAxnr6d6mspoYd0Uk\n\t\t\t\tW0iM7zyxz2P6D9a0er8jNNyumWUW1gnXdKsscig7E7Z9\n\t\t\t\taSQJZ3cgRgUIxtJA568nv+dZR+J2VkCUuVaad/1GrdFb\n\t\t\t\tUOzKBEMKNx5yOcD0p9zEbmw82FAjxDbIqsDvHUEDr9e1\n\t\t\t\tS+dLRjqc0mnK5//Z\n\n </base64>\n\n </value>\n\n </member>\n\n </struct>\n\n </value>\n\n </param>\n\n </params>\n\n </methodCall>\n\n";
"/WSDebugOutHeaders" = {
"Content-Type" = "text/xml";
Host = "pubbawup.net";
"User-Agent" = "Kung-Log/1.3 (Macintosh; U; PPC Mac OS X) WebServicesCore";
};
"/kWSHTTPResponseMessage" = <NSCFType: 0x2142390>;
"/kWSResultIsFault" = 1;
}
I have no clue what's going on, but perhaps you guys can figure out the problem?

Daniel
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post by tomsommer »

Check the path to your upload directory

this doesn't look right: /home/pubbawup/public_html/dand/blog/uploads/uploads/Autumn_leaves.JPG
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
dand
Regular
Posts: 18
Joined: Wed Sep 17, 2003 4:23 am
Contact:

Post by dand »

Indeed! It turns out I have to leave the "Upload path" field in Kung-Log blank and it works fine. Thanks for you help :)

Daniel
Post Reply