added ability to pass in an instance of UploadedFile for better testing