ios6 용 Google 크롬에서 xmlhttprequest 파일 업로드 진행 이벤트에 문제가 있습니다. 코드는 이미 모든 데스크톱 브라우저와 Safari (ios 6)에서 작동합니다. 업로드시 Google 크롬 (ios 6)에 mov 파일을 업로드 할 때 문제가 있습니다. 파일 크기 = 0이됩니다. 해결책이 있습니까?IOS 6 ajax 파일 업로드 진행 이벤트가 작동하지 않습니다.
이 내가 plupload를 사용하여 동일한 문제를 가로 질러 온
var xhr = new XMLHttpRequest();
var eventSource = xhr.upload;
xhr.addEventListener("load", this.onUploadComplete(uploadInfo));
xhr.addEventListener("error", this.onUploadError(uploadInfo));
xhr.addEventListener("abort", this.onUploadAbort(uploadInfo));
// changing Url for preventing ajax call caching(Android , IOS 6)
var ts = Date.now(), rquery = /\?/, rts = /([?&])_=[^&]*/,
ret = uploadUrl.replace(rts, "$1_=" + ts);
uploadUrl = ret + ((ret === uploadUrl) ? (rquery.test(uploadUrl) ? "&" : "?") + "_=" + ts : "");
xhr.open('POST', uploadUrl, true);
eventSource.onprogress = this.onUploadProgress(uploadInfo);
xhr.setRequestHeader("Content-Type", "multipart/form-data");
xhr.setRequestHeader('X-FILE-NAME', file.name);
xhr.send(file);
몇 가지 코드 샘플이나 자세한 내용을 게시 할 수 있습니까? – WebChemist
답장을 보내 주셔서 감사합니다. 내 게시물 – Arshak