updated refs. fixed upload. moved xmlhttprequest into the file model.