Create attachment metadata for xmlrpc uploads. Props mdawaffe. fixes #3452
git-svn-id: http://svn.automattic.com/wordpress/trunk@4628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -872,7 +872,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
);
|
||||
// Save the data
|
||||
$id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id );
|
||||
wp_update_attachment_metadata( $id, array() );
|
||||
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) );
|
||||
|
||||
return apply_filters( 'wp_handle_upload', array( 'file' => $upload[ 'file' ], 'url' => $upload[ 'url' ], 'type' => $type ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user