tonythomas01 / gdrive-to-commons

Tool to upload pictures from Google Drive to Wikimedia Commons ⚠️ Moved to Wikimedia Gerrit, so this repo is read only.
https://gdrive-to-commons.toolforge.org/
Apache License 2.0
9 stars 10 forks source link

Handle errors during upload process and show user friendly messages with modal #48

Open sonegillis opened 4 years ago

sonegillis commented 4 years ago

Description When the user tries uploading pictures to wikimedia commons and an error occurs, nothing is shown to the user. An example of an error I experience was mwclient.errors.APIError: ('fileexists-no-change', 'The upload is an exact duplicate of the current version of [[:File:Registrar.jpg]].', 'See https://test.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.')

To Reproduce Steps to reproduce the behavior:

  1. Go to https://tools.wmflabs.org/google-drive-photos-to-commons/
  2. Accept privacy policy and click on the button "Start uploading"
  3. Login to wikimedia commons
  4. Click on button "Choose photos from Google Drive"
  5. Select a particular photo from your PC and upload
  6. Click on button "Upload More" and select the same photo as selected in step 5, then upload

Expected behavior The user receives a well structured message telling him/her what the error is (in this case for example "You already uploaded file to wikimedia commons").

Actual behavior No feedback. The user has no idea about the error

Desktop

sonegillis commented 4 years ago

@tonythomas01 I would like to work on this