file upload function complete