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:
Andrew Ozz 2019-09-08 02:27:51 +00:00
parent d48d56e101
commit 275f9baeec
2 changed files with 2 additions and 2 deletions

View File

@ -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 = '';
}
} );
};

View File

@ -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 = '';
}
} );