refs #227. Refactor upload code into file model

(not totally complete yet, still need to move resume behavior)