Page MenuHomePhabricator

Make UploadWizard work crossdomain
Closed, InvalidPublic

Description

Author: neilk

Description:
This code is dead and has been sitting in a useless file for a while. Recording it here. Simply changes the type of request to jQuery-specific JSONP.

// If cross domain setup a callback:

			if( ! mw.isLocalDomain( url ) ) {				 
				if( url.indexOf( 'callback=' ) == -1 || parameters[ 'callback' ] == -1 ) {
					// jQuery specific jsonp format: ( second ? is replaced with the callback ) 
					url += ( url.indexOf('?') == -1 ) ? '?callback=?' : '&callback=?';
				}				 
			}

Version: unspecified
Severity: normal

Details

Reference
bz32890

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:06 AM
bzimport added a project: UploadWizard.
bzimport set Reference to bz32890.
bzimport added a subscriber: Unknown Object (MLST).

doesn't cross domain require CORS support ? I never can remember which parts of our API/infra have that and which don't...

neilk wrote:

The idea here is to use JSONP to get around that.

  • Bug 27314 has been marked as a duplicate of this bug. ***
  • Bug 27314 has been marked as a duplicate of this bug. ***

I'm not sure how to test this, but it's implemented....I think you'd need to explicitly allow JSONP requests from the wiki with UW to the wiki with the API. Even then, I'm not entirely sure this would work.

See https://gerrit.wikimedia.org/r/9718

Discussion in gerrit: It's pretty much *not* working. Standby.

I would like to work on this but don't really understand it yet. Can someone throw more light on this bug? or how to reproduce it?

https://gerrit.wikimedia.org/r/9718 (Gerrit Change I47691bb8b12564fcc9f4451907b7d5838c44b8f2) | change ABANDONED [by MarkTraceur]

Hi guys, cross-wiki uploads is on the multimedia team's roadmap for next year:

https://www.mediawiki.org/wiki/UploadWizard

But it is a major undertaking, not something that a quick bug fix can handle.

Marking this as won't fix for now. Thanks for your understanding.

Per conversion with Fabrice:

it is still wanted, and intended to fix, just not now - hence, open, not won't fix.

MarkTraceur claimed this task.

Strangely, we sort of solved this by creating a new upload tool for VisualEditor, and one on the way for WikiEditor. I'm going to call this invalid, because after that, we don't need UploadWizard to be cross-domain.