WordPress.org

Make WordPress Core

Changeset 21656


Ignore:
Timestamp:
08/29/2012 07:56:42 PM (8 years ago)
Author:
koopersmith
Message:

Improve consistency in wp.Uploader callbacks; pass file objects to all handlers. see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/plupload/wp-plupload.js

    r21630 r21656  
    131131        }
    132132
    133         this.uploader.bind( 'UploadProgress', this.progress );
     133        this.uploader.bind( 'UploadProgress', function( up, file ) {
     134            self.progress( file );
     135        });
    134136
    135137        this.uploader.bind( 'FileUploaded', function( up, file, response ) {
     
    144146
    145147            if ( 'error' === response.type )
    146                 return self.error( response.data.message, response.data );
     148                return self.error( response.data.message, response.data, file );
    147149
    148150            if ( 'success' === response.type )
    149                 return self.success( response.data );
     151                return self.success( response.data, file );
    150152
    151153        });
     
    163165            }
    164166
    165             self.error( message, error );
     167            self.error( message, error, error.file );
    166168            up.refresh();
    167169        });
Note: See TracChangeset for help on using the changeset viewer.