aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js')
-rw-r--r--vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js35
1 files changed, 13 insertions, 22 deletions
diff --git a/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js b/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js
index 859846103..c2056b954 100644
--- a/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js
+++ b/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js
@@ -52,7 +52,6 @@
disableImageHead: '@',
disableMetaDataParsers: '@',
disableExif: '@',
- disableExifThumbnail: '@',
disableExifOffsets: '@',
includeExifTags: '@',
excludeExifTags: '@',
@@ -216,31 +215,23 @@
},
thumbnail,
thumbnailBlob;
- if (data.exif) {
- if (options.orientation === true) {
+ if (data.exif && options.thumbnail) {
+ thumbnail = data.exif.get('Thumbnail');
+ thumbnailBlob = thumbnail && thumbnail.get('Blob');
+ if (thumbnailBlob) {
options.orientation = data.exif.get('Orientation');
+ loadImage(thumbnailBlob, resolve, options);
+ return dfd.promise();
}
- if (options.thumbnail) {
- thumbnail = data.exif.get('Thumbnail');
- thumbnailBlob = thumbnail && thumbnail.get('Blob');
- if (thumbnailBlob) {
- loadImage(thumbnailBlob, resolve, options);
- return dfd.promise();
- }
- }
- // Prevent orienting browser oriented images:
- if (loadImage.orientation) {
- data.orientation = data.orientation || options.orientation;
- }
+ }
+ if (data.orientation) {
// Prevent orienting the same image twice:
- if (data.orientation) {
- delete options.orientation;
- } else {
- data.orientation = options.orientation;
- }
+ delete options.orientation;
+ } else {
+ data.orientation = options.orientation || loadImage.orientation;
}
if (img) {
- resolve(loadImage.scale(img, options));
+ resolve(loadImage.scale(img, options, data));
return dfd.promise();
}
return data;
@@ -320,7 +311,7 @@
file = data.files[data.index],
// eslint-disable-next-line new-cap
dfd = $.Deferred();
- if (data.orientation && data.exifOffsets) {
+ if (data.orientation === true && data.exifOffsets) {
// Reset Exif Orientation data:
loadImage.writeExifData(data.imageHead, data, 'Orientation', 1);
}