filedownload

    [.NET] 비동기 ZIP File Download API (서버 올리기)

    [.NET] 비동기 ZIP File Download API (서버 올리기)

    저번 게시글에서 작성한 에 대해 클라에서 다운로드 받는 로직을 구현했다. 매개변수 값을 토대로 서버에서 파일을 찾아 다운로드 받으면 되는 방식. 동기식은 await, async를 제거하면 끝. 많이 리서치 한다고 해도 아직 실무에 직접 적용해 성능 비교가 어려운 것 같다. 1. 코드 [HttpGet] [Route("api/zipDownload")] public async Task SetFileZipDownLoad(string fileName) { //서버 zip파일 찾기 string zipFileURL = HttpContext.Current.Server.MapPath("/zip/" + fileName + ".zip"); WebClient req = new WebClient(); HttpResponse r..