Fixed some problems with the input callback.

Fixes some issue with media uploads not saving properly on posts.

/cc @bummytime