Skip to content

Commit b03918d

Browse files
committed
Only save image meta data if the image could be resized.
1 parent 05ed2ef commit b03918d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/jquery.fileupload-image.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Image Preview & Resize Plugin 1.2.1
2+
* jQuery File Upload Image Preview & Resize Plugin 1.2.2
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2013, Sebastian Tschan
@@ -266,7 +266,8 @@
266266
},
267267

268268
saveImageMetaData: function (data, options) {
269-
if (!data.imageHead || options.disabled) {
269+
if (!(data.imageHead && data.canvas &&
270+
data.canvas.toBlob && !options.disabled)) {
270271
return data;
271272
}
272273
var file = data.files[data.index],

0 commit comments

Comments
 (0)