Skip to content

Commit a596c7e

Browse files
committed
Only resize images if the browser supports XHR file uploads.
1 parent df5d490 commit a596c7e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

js/jquery.fileupload-ip.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Image Processing Plugin 1.0.5
2+
* jQuery File Upload Image Processing Plugin 1.0.6
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2012, Sebastian Tschan
@@ -112,9 +112,10 @@
112112
resize: function (data) {
113113
var that = this,
114114
options = $.extend({}, this.options, data),
115-
resizeAll = $.type(options.resizeSourceMaxFileSize) !== 'number';
115+
resizeAll = $.type(options.resizeSourceMaxFileSize) !== 'number',
116+
isXHRUpload = this._isXHRUpload(options);
116117
$.each(data.files, function (index, file) {
117-
if (that._resizeSupport &&
118+
if (isXHRUpload && that._resizeSupport &&
118119
(options.resizeMaxWidth || options.resizeMaxHeight ||
119120
options.resizeMinWidth || options.resizeMinHeight) &&
120121
(resizeAll || file.size < options.resizeSourceMaxFileSize) &&

0 commit comments

Comments
 (0)