Added file upload code to Controller