Correct file upload functionality