Upload: Reset the temp upload reference in Plupload when the file is not an image.
See #47872. git-svn-id: https://develop.svn.wordpress.org/trunk@46081 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d48d56e101
commit
275f9baeec
2
src/js/_enqueues/vendor/plupload/handlers.js
vendored
2
src/js/_enqueues/vendor/plupload/handlers.js
vendored
@ -601,7 +601,7 @@ jQuery( document ).ready( function( $ ) {
|
||||
if ( file.type && file.type.indexOf( 'image/' ) === 0 ) {
|
||||
up.settings.multipart_params._wp_temp_image_ref = file.id;
|
||||
} else {
|
||||
unset( up.settings.multipart_params._wp_temp_image_ref );
|
||||
up.settings.multipart_params._wp_temp_image_ref = '';
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
@ -326,7 +326,7 @@ window.wp = window.wp || {};
|
||||
if ( file.type && file.type.indexOf( 'image/' ) === 0 ) {
|
||||
up.settings.multipart_params._wp_temp_image_ref = file.id;
|
||||
} else {
|
||||
unset( up.settings.multipart_params._wp_temp_image_ref );
|
||||
up.settings.multipart_params._wp_temp_image_ref = '';
|
||||
}
|
||||
} );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user