aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2020-06-14 15:39:00 +0200
committerMario Vavti <mario@mariovavti.com>2020-06-14 15:39:00 +0200
commit7270da6a28f836f94f6d98557df9532e587c3646 (patch)
tree86bc0a8d3956ae4bff86dcbb96bb3b88b68e5daa /vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js
parent8cd66145bdd8bf0f43c2a1774181c974335fc494 (diff)
parent92ee27349cb62e0a78f25686c3fe64cd8dd4130c (diff)
downloadvolse-hubzilla-7270da6a28f836f94f6d98557df9532e587c3646.tar.gz
volse-hubzilla-7270da6a28f836f94f6d98557df9532e587c3646.tar.bz2
volse-hubzilla-7270da6a28f836f94f6d98557df9532e587c3646.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
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);
}