Skip to content

Commit

Permalink
HTML5: Cross-site HTTP requests with credentials: https://developer.m…
Browse files Browse the repository at this point in the history
  • Loading branch information
Max committed Apr 18, 2013
1 parent 664f892 commit 8a52ef2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/javascript/plupload.html5.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -643,6 +643,10 @@
boundary = '----pluploadboundary' + plupload.guid(), formData, dashdash = '--', crlf = '\r\n', multipartBlob = ''; boundary = '----pluploadboundary' + plupload.guid(), formData, dashdash = '--', crlf = '\r\n', multipartBlob = '';


xhr = new XMLHttpRequest; xhr = new XMLHttpRequest;
if (xhr.withCredentials !== undefined) {
// https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS#Requests_with_credentials
xhr.withCredentials = true;
}


// Do we have upload progress support // Do we have upload progress support
if (xhr.upload) { if (xhr.upload) {
Expand Down

1 comment on commit 8a52ef2

@kbaldyga
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
you need to add the "withCredentials" flag after xhr.open("post", url, true); (line 729 in your changed file). Otherwise it will throw InvalidStateError in IE10 (and safari mobile 5)

Please sign in to comment.