Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting uploaded media #30

Open
manton opened this issue Jul 2, 2020 · 6 comments
Open

Deleting uploaded media #30

manton opened this issue Jul 2, 2020 · 6 comments
Labels
media endpoint Media Endpoint

Comments

@manton
Copy link

manton commented Jul 2, 2020

Does anyone's media endpoint support deleting uploaded files? It seems like there are 2 options here:

  1. The media endpoint could accept action=delete and a url of the uploaded file. This would be consistent with deleting posts, but on the media endpoint instead.
  2. The regular Micropub endpoint could just allow deleting uploads with the same format as deleting posts, but the 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.

@jamietanna
Copy link

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.

@aaronpk
Copy link
Member

aaronpk commented Jul 25, 2020

I'm in favor of #1, and I agree that delete media scope should be required in order to delete files.

@dshanske
Copy link
Member

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.

@aaronpk aaronpk added the media endpoint Media Endpoint label Jul 25, 2020
@aaronpk
Copy link
Member

aaronpk commented Jul 26, 2020

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.

@manton
Copy link
Author

manton commented Jul 28, 2020

Micro.blog supports this. It doesn't currently have a new scope, although I plan to add that later.

@dshanske
Copy link
Member

Micropub for WordPress supports this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
media endpoint Media Endpoint
Projects
None yet
Development

No branches or pull requests

4 participants