Permalink
Browse files

Use $.support.cors instead of $.ajaxSettings.xhr().withCredentials.

  • Loading branch information...
1 parent 2c96684 commit 9a6fd666c47a6ee07641b58cecf00ae277405c76 @blueimp committed Mar 15, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 js/cors/jquery.xdr-transport.js
  2. +2 −2 js/main.js
View
4 js/cors/jquery.xdr-transport.js
@@ -1,5 +1,5 @@
/*
- * jQuery XDomainRequest Transport Plugin 1.1.1
+ * jQuery XDomainRequest Transport Plugin 1.1.2
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2011, Sebastian Tschan
@@ -26,7 +26,7 @@
}
}(function ($) {
'use strict';
- if (window.XDomainRequest && $.ajaxSettings.xhr().withCredentials === undefined) {
+ if (window.XDomainRequest && !$.support.cors) {
$.ajaxTransport(function (s) {
if (s.crossDomain && s.async) {
if (s.timeout) {
View
4 js/main.js
@@ -1,5 +1,5 @@
/*
- * jQuery File Upload Plugin JS Example 6.5
+ * jQuery File Upload Plugin JS Example 6.5.1
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
@@ -38,7 +38,7 @@ $(function () {
resizeMaxHeight: 1200
});
// Upload server status check for browsers with CORS support:
- if ($.ajaxSettings.xhr().withCredentials !== undefined) {
+ if ($.support.cors) {
$.ajax({
url: '//jquery-file-upload.appspot.com/',
type: 'HEAD'

0 comments on commit 9a6fd66

Please sign in to comment.