resume file uploading
refactored file upload callback