I have a custom post type with two custom meta boxes.
The first meta box is a gallery that allows me to upload some images. The second meta box is a drop-down with some options.
I selected an option from second meta box. Then, inside the first meta box, I have a button to open WP Media Uploader. After I have uploaded some images and clicked the 'Insert selected Images'. My browser will auto refresh because of the gallery(It needs to show thumbnail of those images).
My problem is when the browser is refreshed, my second custom meta box data will be gone.
I need to trigger the save_as_draft function for the WP Media Uploader when I click the 'Insert Selected Images'. Any ideas?