finish file upload method