We're considering adding an "upload to wikimedia commons" button for suitably-licensed images on our site, and am wondering where the API for this is documented, and/or if we need to go through an approval process to have our code allowed to do this.  The closest similar thing I can think of is the Wikimedia Commons app (for ios or android) where you set it up once with your username and password, and then it lets you upload images very easily from your phone.

Of course, in this case, it wouldn't be the reader's own work, so there'd have to be some extra metadata we sent along.

Anyway, I can't seem to find the information I need.   The app page is here, https://www.mediawiki.org/wiki/Apps/Commons/Support, but there is no link to the source code -- I'd have thought that it would be open source.

The Commons API pages I can find (https://commons.wikimedia.org/wiki/Commons:APIhttp://tools.wmflabs.org/magnus-toolserver/commonsapi.phphttps://commons.wikimedia.org/wiki/Commons:API/MediaWiki) only describe the read-only side.

Something else I'm not sure about:  would the images be uploaded via the individual user's account, or through our institution's account on Commons?  While I write this, I realize that there is another issue -- we would want to keep track of which images have been uploaded already, and in those cases, the button, rather than causing the upload, should take the user to the already-uploaded image page.  Is anyone else doing something like this?

Can anyone offer some pointers?

Thanks!
Chris Maloney