Fwd: [wp-hackers] Bug in wp_upload_bits?

Steve Winton stevewinton at gmail.com
Tue Nov 28 13:18:35 GMT 2006


On 11/28/06, Peter Westwood <peter.westwood at ftwr.co.uk> wrote:
>
> On Tue, November 28, 2006 11:24 am, Steve Winton wrote:
> > Hi Peter
> >
> > Forwarding this to you personally - it's waiting to be approved by the
> > wp-hackers list moderator because the message is so big.
> >
> > Cheers,
> > Steve
> >
> > ---------- Forwarded message ----------
> > From: Steve Winton <stevewinton at gmail.com>
> > Date: Nov 28, 2006 11:12 AM
> > Subject: Re: [wp-hackers] Bug in wp_upload_bits?
> > To: wp-hackers at lists.automattic.com
> >
> >
> > Hi Peter,
> >
> > Thanks for this.
> >
> > I'm using the XML-RPC for PHP library, version 2.1
> > (http://phpxmlrpc.sourceforge.net/).
> >
> > The HTTP request sent by the library is attached
> > (newMediaObject_request.txt). Hope it's ok to send attachments to this
> > list - my email client was messing with the formatting when I did a
> > straight copy and paste!
> >
>
> Ok.
>
> Your request looks like this:
>
> <methodCall>
>  <methodName>metaWeblog.newMediaObject</methodName>
>  <params>
>   <param>
>    <value>
>     <array>
>      <data>
>       <value><string>0</string></value>
>       <value><string>steve</string></value>
>       <value><string>welcome</string></value>
>       <value>
>        <struct>
>         <member>
>          <name>name</name>
>          <value><string>09 Do You Speak English_.mp3</string></value>
>         </member>
>         <member>
>          <name>type</name>
>          <value><string>audio/mpeg</string></value>
>         </member>
>         <member>
>          <name>bits</name>
>          <value><string></string></value>
>         </member>
>        </struct>
>       </value>
>      </data>
>     </array>
>    </value>
>   </param>
>  </params>
> </methodCall>
>
> The bug is here: "<value><string>base64stuff</string></value>"
>
> That should be "<value><base64>base64stuff</base64></value>"
>
> See the XMLRPC [1] and metaweblogapi [2] specs for more info.
>
> [1] http://www.xmlrpc.com/spec
> [2] http://www.xmlrpc.com/metaWeblogApi#metaweblognewmediaobject
>
> westi
> --
> Peter Westwood <peter.westwood at ftwr.co.uk>
> http://blog.ftwr.co.uk
>

Ah! A dumb newbie mistake! Thanks for your help, I've changed this and
it's now working as expected!

Cheers,
Steve


More information about the wp-hackers mailing list