| 제목 | 파일업로드시 IE... 질문드립니다. | ||
|---|---|---|---|
| 글쓴이 | 이그제트 | 작성시각 | 2015/08/24 16:23:23 | 
|  | |||
| 하..이거때문에 고생인데요 크롬에선 이상없이 잘되는데요... IE에선 업로드시 (ajax fileuplpoad로 처리 ) 서버엔 정상적으로 업로드되는데요 해당 filename을 가져와 DB에 저장해야되는데 그 부분이 안되네요... 업로드 후 output을 application/json 으로하는데 IE에서는 다운로드를 받네요.. 이거 해결 할 방법이 있을까요.. 소스 첨부합니다. --ajax 요청 $('input[name="image_1"]').fileupload({ url: '/api/upload/project?image=image_1', dataType: 'json', done: function (e, data) { var result = data.result.file; var url = result.url; var file_name = result.file_name; $('#file_name1').val(file_name); $('#thum_file_name').val('thumb_'+file_name); } }).prop('disabled', !$.support.fileInput) .parent().addClass($.support.fileInput ? undefined : 'disabled'); --fileupload output $this->output ->set_status_header('200') ->set_content_type(' ') ->set_output(json_encode($response, JSON_NUMERIC_CHECK)); 부탁드립니다. ㅠㅠ | |||
| 다음글 | 새로고침없이 {yield} 부분만 변경할 수 있을까요? (3) | ||
| 이전글 | routes.php 설정 질문 (4) | ||
| 
                                들국화
                                /
                                2015/08/24 16:29:57 /
                                추천
                                0
                             | 
| 
                                이그제트
                                /
                                2015/08/24 16:47:18 /
                                추천
                                0
                             
                                들국화님 답변감사드립니다. Content-Type 수정을 output 에서 set_content_type('text/plain') 으로 변경해야하나요? 동일한 현상이 발생하네요 ㅠㅠ | 
| 
                                들국화
                                /
                                2015/08/24 16:54:20 /
                                추천
                                0
                             
                                네.. header 를 변경해야 한다고 하네요.
                             | 
| 
                                이그제트
                                /
                                2015/08/24 18:25:03 /
                                추천
                                0
                             
                                흠....수정해봤는데 안되네요ㅠㅠ
                             | 
| 
                                들국화
                                /
                                2015/08/25 08:58:30 /
                                추천
                                0
                             
                                이그제트// 헤더가 정확하게 txt/plain 이나 text/html 로 오는지 확인해 보세요. 그리고 ie 버전이 몇인지 궁금 하네요. | 
| 
                                하늘치
                                /
                                2015/08/25 13:00:09 /
                                추천
                                0
                             | 
http://stackoverflow.com/questions/8892819/ie8-treats-json-response-as-file-and-tries-to-download-it