Opened 19 years ago
Closed 12 years ago
#5310 closed enhancement (fixed)
XMLRPC interface should expose mechanism for listing and deleting media resources
| Reported by: | redsweater | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.0 |
| Component: | XML-RPC | Version: | 2.3.1 |
| Severity: | normal | Keywords: | good-first-bug has-patch commit |
| Cc: | Focuses: |
Description
Right now the XMLRPC interface supports the "newMediaObject" mechanism that is part of the MetaWeblog API, but lacks any method for inspecting or otherwise manipulating media objects.
I think to support a richer remote client experience, the XLMRPC interface should support at least a method for listing the media objects that have been previously uploaded (similar to what appears in the "Browse" tab of the wp-admin post editor), and for deleting a media asset that is present.
Attachments (2)
Change History (20)
#3
@
17 years ago
- Keywords needs-patch added
- Milestone 2.9 → Future Release
Needs a patch.
Moving to Future Release for now.
#4
follow-up:
↓ 5
@
12 years ago
- Keywords good-first-bug added
We now have a method for listing items in the media library (wp.getMediaLibrary) but still none for deleting media items.
#5
in reply to: ↑ 4
@
12 years ago
Replying to johnbillion:
... but still none for deleting media items.
Actually, since media items are really just a post type, you can use wp.deletePost method to delete them. Likewise, you can use wp.editPost to modify most of the media item fields (except image and alt-text, the latter of which is a protected meta).
It might be nice to have a simple wrapper to make this more obvious to new users, or else add some documentation to the Codex.
This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.
12 years ago
#14
@
12 years ago
- Resolution fixed
- Status closed → reopened
I wonder if the alias should be called wp.deleteFile, for consistency with wp.uploadFile. See 5310.diff.
This ticket was mentioned in IRC in #wordpress-dev by SergeyBiryukov. View the logs.
12 years ago
#17
in reply to: ↑ 16
@
12 years ago
Replying to DrewAPicture:
+1 for swapping the aliases.
Agreed.
I think wp.deleteFile is a better name and more consistent with the others.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
itching to move this in Media