http://www.movabletype.org/docs/mtmanual_p...ogrammatic.html

The return value for the newMediaObject call is said to be the "URL of the file uploaded". In truth, it is a struct, which contains a key called "url". Given the difficulty of debugging XML-RPC calls, this took a while to spot.

Thanks,
M