Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Commit

Permalink
Use $.support.cors instead of $.ajaxSettings.xhr().withCredentials.
Browse files Browse the repository at this point in the history
  • Loading branch information
blueimp committed Mar 15, 2012
1 parent 2c96684 commit 9a6fd66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 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
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions 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
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 9a6fd66

Please sign in to comment.