mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Uploader: Route plupload errors to the correct handler and prevent naming conflicts. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
46020c6dd0
commit
095093e390
@ -211,19 +211,19 @@ window.wp = window.wp || {};
|
||||
self.success( file.attachment );
|
||||
});
|
||||
|
||||
this.uploader.bind( 'Error', function( up, error ) {
|
||||
this.uploader.bind( 'Error', function( up, pluploadError ) {
|
||||
var message = pluploadL10n.default_error,
|
||||
key;
|
||||
|
||||
// Check for plupload errors.
|
||||
for ( key in Uploader.errorMap ) {
|
||||
if ( error.code === plupload[ key ] ) {
|
||||
if ( pluploadError.code === plupload[ key ] ) {
|
||||
message = Uploader.errorMap[ key ];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
self.error( message, error, error.file );
|
||||
error( message, pluploadError, pluploadError.file );
|
||||
up.refresh();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user