refactor fileUploader