Implement upload and download handler