more file upload controller refactoring