[wp-trac] [WordPress Trac] #30872: No return value for XML RPC call of wp.uploadFile and metaWeblog.newMediaObject for a gif animated file

WordPress Trac noreply at wordpress.org
Wed Dec 31 19:20:51 UTC 2014


#30872: No return value for XML RPC call of wp.uploadFile and
metaWeblog.newMediaObject for a gif animated file
--------------------------+-----------------------------
 Reporter:  alsachris     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  XML-RPC       |    Version:  4.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi,

 I think a have detect a bug. This php code will not return id, filename
 ... when i will choose a animated gif image file, for the 2 functions
 wp.uploadFile and metaWeblog.newMediaObject.
  However, the file is good placed in the media folder of WP.

 {{{

 $img='/var/www/wp/test.gif';
 $content = array(
             'name' => basename($img),
             'type' => mime_content_type($img),
             'bits' => new IXR_Base64(file_get_contents($img)),
                 'overwrite' =>false
         );
 //        $res=$client->query('metaWeblog.newMediaObject', 0, 'user',
 'pass', $content);
 echo       $res=$client->query('wp.uploadFile', 0, 'user', 'pass',
 $content);
 var_dump($res);

 }}}


 The source gif is [http://www.ref68.com/temp/of9x.gif]

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30872>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list