사이트 내 전체검색
아이폰에서 파일 다운로드가 잘안됐다 [출처] 아이폰에서 파일 다운로드가 잘안됐다.|작성자 삽지리
로빈아빠
https://cmd.kr/html/225 URL이 복사되었습니다.

본문

아이폰에서 hwp파일을 다운로드 못하고 있다

안드로이드 폰에서는 잘돼는데..

 

사파리랑 ie,아이폰처럼 세팅한 ff로 통신을하고 와이어샤크로 패킷잡아서 header를 분석해서

content-type를 맞춰봤지만 말짱허사..

naver에서도 hwp파일이 다운로드가 잘안되더라.

그래서

header ("Pragma: public");
     header ("Cache-Control: no-store, max-age=0, no-cache, must-revalidate"); // HTTP/1.1
     header ("Cache-Control: post-check=0, pre-check=0", false);
     header ("Cache-Control: private");  

header ("Content-Disposition: attachment; filename=\"".$filename."\"");
 header('Content-Type: text/html; charset=utf-8'); 
 if ($isIE && !$isIE6) {
     header ("Content-Type: application/download;");
 } else {
//     header ("Content-Type: application/octet-stream; name=\"$filename\"");
  header ("Content-Type: ".$_GET['mime']."; name=\"$filename\"");
//     header ("Content-Type: doesn/matter;");
 }
 header("Content-Transfer-Encoding: binary"); 

를 통째로 넣었다.?

 

위코드는 php코드지만 java에서도 넣는 방식에는 그닥 차이가 없다..

그랬더니 잘된다.

저게 되기전에 안됐던경우는

header ("Pragma: public");
header ("Cache-Control: private");  

이렇게만했던경우인데

header ("Cache-Control: private");    대신

 

header ("Cache-Control: no-store, max-age=0, no-cache, must-revalidate"); // HTTP/1.1
header ("Cache-Control: post-check=0, pre-check=0", false);
header ("Cache-Control: private");  

이부분에 해당하는걸 넣었더니 잘되었다.

ie랑 ff ,사파리가 저부분 가져오는게 각각 달랐는데 아마도

이게 문제가 아니였던가 싶다.

댓글목록

등록된 댓글이 없습니다.

Search

Copyright © Cmd 명령어 52.14.174.133