Create attachment metadata for xmlrpc uploads. Props mdawaffe. fixes #3452

git-svn-id: https://develop.svn.wordpress.org/trunk@4628 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-12-07 22:42:22 +00:00
parent bc386e1784
commit e8184e1027
4 changed files with 122 additions and 124 deletions

View File

@@ -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 ) );
}