How to make uploaded file permanent to node without node submit
You could try the autosave module, which allows automatic saving of the node form via ajax while the user is editing the form.

If it doesn't do exactly what you are after it would be a great place to look for ideas on how to code it yourself.

Probably if it doesn't do exactly what you want the easiest path might be to make a patch for that module to add what you need, instead of writing something from scratch.