HTTP 헤더의 컨텐츠 증식 대안 (C#)
-
22-07-2019 - |
문제
거기가 있습니까? 대안 "첨부 파일; filename = ..."가있는 내용-예측?
나는 Fly Exe 파일에서 스트리밍을 보내고 있으며 브라우저가 보내기 시작할 때 "Save As as"또는 "Run"을 열기를 바랍니다.
C# HttPresponseHeader를 사용하고 있으며 회원 또는 HTTPWorkerRequest 회원을 사용하고자합니다.
고마워, 모시
해결책
Content-Disposition
브라우저가 파일을 저장하라는 프롬프트를 제공하는 올바른 방법입니다. 사용 HttpResponse.AppendHeader()
헤더 값을 추가하려면 예를 들어 :
Response.AppendHeader("Content-Type", "...")
Response.AppendHeader("Content-Disposition", "attachment; filename=...")
제휴하지 않습니다 StackOverflow