refactored. Upload->File. added test