Open manton opened 4 years ago
While I'm thinking about scope-based security, when I implement this I would be expecting that this is only possible when delete media
scopes are present, similar to how post deletions are only available when delete
is present.
I'm in favor of #1, and I agree that delete media
scope should be required in order to delete files.
Consensus at Micropub Popup 2020 for individuals present was ot use the Micropub endpoint delete syntax and require the delete and media scopes to do so.
My media endpoint now supports this action:
curl https://media.aaronpk.com/endpoint.php -H "Authorization: Bearer XXXX"
-X POST
-d action=delete
-d url=https://media.aaronpk.com/photo.jpg
It requires media delete
scopes. It returns a 200
response if the delete was successful.
Micro.blog supports this. It doesn't currently have a new scope, although I plan to add that later.
Micropub for WordPress supports this.
Does anyone's media endpoint support deleting uploaded files? It seems like there are 2 options here:
action=delete
and aurl
of the uploaded file. This would be consistent with deleting posts, but on the media endpoint instead.url
would be referencing a JPEG or other uploaded file.I'm leaning toward the 1st option because there is already a proposal to have
q=source
on the media endpoint, so it makes sense to me that media-related API calls would be on the media endpoint where possible.