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

Add Option to delete the uploaded image. #1139

Closed
ujjwalagrawal17 opened this issue Feb 12, 2018 · 16 comments
Closed

Add Option to delete the uploaded image. #1139

ujjwalagrawal17 opened this issue Feb 12, 2018 · 16 comments

Comments

@ujjwalagrawal17
Copy link
Collaborator

Summary
Sometimes we upload images that are not good and later on we should have an option to delete or suspend the image. This can be done by providing buttons in image list on clicking will call an HTTP request to delete/Suspend it from the database.

@nicolas-raoul
Copy link
Member

Once you release a picture under an open license, you can not retract it.
It might be deleted if you have very good reasons, but in any case it is a human process.
We can offer a button that helps users get started with the process, but we should not give the impression that deletion is always possible.
https://commons.wikimedia.org/wiki/Commons:Courtesy_deletions

@misaochan
Copy link
Member

misaochan commented Feb 13, 2018

AFAIK you can nominate your own photo for deletion, but indeed it is up to the discretion of the Commons community. It would certainly be nice if we had a button for this, though. :)

@diddypod
Copy link

diddypod commented Feb 22, 2018

Is anyone working on adding a button to request deletion? I'd like to take it up otherwise.

@nicolas-raoul
Copy link
Member

@diddypod Could you please first describe exactly what actions the button will call, using what Wikimedia API requests? (complete with the API method parameters)
Thanks! That will avoid possible misunderstandings.

@VojtechDostal
Copy link
Collaborator

IMHO It should basically nominate the picture for deletion.There is a link for that in the sidebar. Would that be possible?

@diddypod
Copy link

I did a bit more reading and found that API:Delete is not for nomination. A better choice would be to use API:Edit to edit the relevant pages as described in Commons:Deletion requests/Listing a request manually.

As for the Nominate for Deletion buttons on the page, it uses JavaScript to update the relevant pages. However, I've been having difficulty in trying to inject text into the text field using JavaScript in a webView. If someone can help me with that, I think I can implement this feature using the Nominate button.

@diddypod
Copy link

I've managed to get the script injection working. Should I take this up? @nicolas-raoul @misaochan

@ujjwalagrawal17
Copy link
Collaborator Author

@diddypod If you have started working on in you work on it. I will work on other issues.

@misaochan
Copy link
Member

@diddypod Nice! I'm inclined to say yes, but probably best to wait for @nicolas-raoul to confirm.

@nicolas-raoul
Copy link
Member

@diddypod Sorry for the delay!

I guess that only administrators have the permission to use API:Delete, so you are right that the best is to edit the relevant pages as described in Commons:Deletion requests/Listing a request manually.

Do you mean you have succeeded to create the deletion request? Nice job! In that case, waiting for your pull request :-)

@diddypod
Copy link

Hi @nicolas-raoul

I've tried using the method described by @VojtechDostal above, i.e. using the JavaScript on the File page to Nominate for deletion. However, since I'm using a WebView for it, the user is not logged in by default. Should I prompt the user to Log In once more or is it fine to send the Delete Request without logging in? (In this case the IP of the user will be recorded instead of their username on the relevant pages).

@nicolas-raoul
Copy link
Member

Rather than prompt for a user/password again (with the associated security risks), better:

  1. Study what the buttons does (what pages it edits, what text it adds to each page)
  2. Implement the same edits using the Mediawiki API
    Thanks!

@diddypod
Copy link

Okay, I'll do that. Starting work on it :)

@maskaravivek
Copy link
Member

maskaravivek commented Feb 27, 2018

@diddypod Also if you get stuck you could also ask MediaWiki folks to help you out by raising a ticket here.

https://phabricator.wikimedia.org/

@diddypod
Copy link

I have implemented the feature using the API, but I'm having a bit of trouble trying to disable the nomination process once a successful deletion is processed.
This is what I've done so far here

@maskaravivek
Copy link
Member

@diddypod Can you open a PR for the same. It would be easier to review that way. :)

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

No branches or pull requests

6 participants