프로젝트

일반

사용자정보

개정판 0a89a17f

ID0a89a17fc5673b9a6417f46558c937d64234bfc0
상위 06f13e11
하위 484b88ec

김태성이(가) 5년 이상 전에 추가함

다운로드 파일명 수정

Change-Id: Ic6671952e536d9cffed7c136838174c03f6c6bb0

차이점 보기:

ConvertService/ServiceBase/Markus.Service.Extensions/Helper/GetDownloadFileName.cs
39 39
            return FileName;
40 40
        }
41 41

  
42
        private static string GetDownloadFileName(string downloadUri)
42
        public static string GetDownloadFileName(string downloadUri)
43 43
        {
44 44
            string fileName = "";
45

  
45
            
46 46
            System.Net.WebClient wc = new System.Net.WebClient();
47 47
            var data = wc.DownloadData(downloadUri);
48 48

  
......
51 51
                var contentDisposition = wc.ResponseHeaders["Content-Disposition"];
52 52
                fileName = GetFileNameInDisposition(new System.Net.Mime.ContentDisposition(contentDisposition));
53 53
            }
54
            else
55
            {
56
                var contenttype = wc.ResponseHeaders[System.Net.HttpResponseHeader.ContentType];
57

  
58
                if (contenttype == "application/pdf")
59
                {
60
                    fileName = downloadUri.Remove(0, downloadUri.LastIndexOf("/") + 1);
61
                }
62
            }
54 63

  
55 64
            return fileName;
56 65
        }

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)