Apps-android-commons: Add Option to delete the uploaded image.

Created on 12 Feb 2018  路  16Comments  路  Source: commons-app/apps-android-commons

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.

user experience

Most helpful comment

@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 :-)

All 16 comments

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

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. :)

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

@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.

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

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.

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

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

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

@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 :-)

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).

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!

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

@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/

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

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

Was this page helpful?
0 / 5 - 0 ratings