The code below resides in my theme's functions.php and creates a custom upload icon on top of the WordPress content editor, alongside the default upload icon.
Images uploaded via this icon get a special flag in wp_postmeta called _imageTop to differentiate them from standard attached images (to allow me to do special things to them as a separate collection of "attached" images).
I've got 3 problems occuring that I'm sure are simple fixes.
1) The attachment_fields_to_save filter does not get applied, even though I can see the echo'd text inside the media-upload.php window. I know this because the _imageTop meta only gets written to the database when I comment out the if(isset) check
2) After the images have been uploaded, I have to click on "Save all changes" to get the _imageTop meta to save to the database. Ideally, I'd like the data saved immediately after the upload, without having to click "Save all changes". This is probably due to the fact that the attachment_fields_to_save handler only fires on the "Save all changes" hook. Nevertheless, I'd like to figure out how to get it to fire when the images have been uploaded.
3) I want to remove the "insert into post" link from the screen.