CreateMedia
Creates a new media item, such as an image, video, or document, and uploads it to the WordPress.com Media Library for use in posts or pages.
Table Specific Information
Execute
Upload a new piece of media.
Note: To Upload a new piece of media, you must specify the Media column.
EXEC CreateMedia Media='"C:\\Users\\Downloads\\cdata.png"';
Input
| Name | Type | Description |
| FileLocation | String | The path or URL of the file to be uploaded to the WordPress Media Library. |
| MediaUrls | String | The URL or list of URLs for the media items uploaded to WordPress. |
| Title | String | The title assigned to the media item in WordPress. |
| Description | String | The description text for the media item in WordPress. |
| Caption | String | The caption text to display with the media item in WordPress. |
| ParentId | String | The identifier of the post or page the media item is attached to in WordPress. |
| FileName | String | The file name assigned to the uploaded media item in WordPress. |
Result Set Columns
| Name | Type | Description |
| Success | String | Indicates whether the operation was successful or not. |
| Media | String | An array of uploaded media objects representing the files added to the WordPress Media Library. |