Im also having this issue and Ive been searching for a solution for the last few days but I couldnt find one.
Basically once you set ignore:(+ new Date()), the uploader uploads to the old non-ignore collection. You can verify this by manually setting ignoreedit:null ok after an upload and seeing that the upload appears again. The downside toworking on this is that it loads an old cached collection so you losefor the refresh functionality.
I did manage to figure outlast hour ive finally found a workaround using collection.reset() but its not perfect as it clears the gallery during upload. But once the upload completes everything renders correctly again.solution that works without affecting uploading and without messing with ignore or reset
// this runs once upload starts
wp.media.frame.on('library:selection:add''open', function() {
if (wp.media.frame.content.get() !== null) {
wp.media.frame.content.get().collection.props.set({ignore: null});
wp.media.frame.content.get().collection.reset(); // this is the missing link
forces a refresh }of elsethe {content
wp.media.frame.library.propscontent.setget({ignore: null});
}
}, this);
wp.media.framecollection.on('open', function_requery(true) {;
if (wp.media.frame.content.get() !== null) {
wp.media.frame.content.get().collection.props.set({ignore:// (+optional: newreset Date())});selection
wp.media.frame.content.get().options.selection.reset();
} else {
wp.media.frame.library.props.set({ignore: (+ new Date())});
}
}, this);