[wp-trac] [WordPress Trac] #20532: Cannot use more than one wp.Uploader (Plupload) instance
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 24 13:59:48 UTC 2012
#20532: Cannot use more than one wp.Uploader (Plupload) instance
--------------------------+-----------------------------
Reporter: kovshenin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upload | Version: 3.4
Severity: normal | Keywords:
--------------------------+-----------------------------
Hey there!
Found this bug while playing with the Customizer's Image control and the
image context. Turns out every control will use the same Plupload
instance, so the context will be set to the one, specified by the latest
control rendered on screen. This verifies that no matter how many "new"
wp.Uploader objects you create, it is still the same one:
{{{
var u1 = new wp.Uploader();
var u2 = new wp.Uploader();
u1.param( 'some_key', 'first value' );
u2.param( 'some_key', 'second value' );
console.log( u1.uploader.settings.multipart_params.some_key ); // logs:
second value
console.log( u2.uploader.settings.multipart_params.some_key ); // logs:
second value
}}}
I'm not too confident in my JS skills to handle a patch, sorry.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20532>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list