Last modified: 2014-03-21 17:43:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55128, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53128 - PronunciationRecording: Allow recordings to be uploaded to central media repository (Commons)
PronunciationRecording: Allow recordings to be uploaded to central media repo...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
PronunciationRecording (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Rahul Maliakkal
:
Depends on: 53127
Blocks: 46610
  Show dependency treegraph
 
Reported: 2013-08-20 21:44 UTC by Matthew Flaschen
Modified: 2014-03-21 17:43 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2013-08-20 21:44:40 UTC
Cross-wiki uploads are the next major step after same-wiki ones.
Comment 1 Matthew Flaschen 2013-10-04 00:11:48 UTC
You should probably start by making a config variable for the API URL.  Check out how MobileFrontend does it (https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMobileFrontend.git/a4372c2b5402db3d406f176d4235d726d5cc9d99/MobileFrontend.php#L163).

You can export that to JavaScript with https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars .

Then, pass that to the UploadWizard config.  

However, you will need to deal with CORS (https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS).  In the past, such cross-domain AJAX requests never worked.  Now, they can, but only if CORS is configured.  You will need to change UploadWizard to deal with this, since it does the actual uploading.

MobileFrontend shows how to handle CORS as well (look at PhotoApi.js).

However, you will not be able to change the production (actual Wikimedia Commons) CORS config to allow access from http://pronunciationrecording.instance-proxy.wmflabs.org/

You might be able to get permission to test against https://commons.wikimedia.beta.wmflabs.org/w/api.php (Beta Commons) (ccing Antoine for this).  Otherwise, you'll need to set up your own destination wiki to test with (separate from http://pronunciationrecording.instance-proxy.wmflabs.org/).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links