Added file upload function