complete file upload and download