finalized uploading function
finalized uploading function