backed out the file upload logic