Including EXIF JS library in the modules dependencies to fix orientation when uploading images

This commit is contained in:
Djamil Legato
2018-06-01 12:14:21 -07:00
parent 858badaf35
commit ac13462b64
6 changed files with 26 additions and 16 deletions

View File

@@ -1,6 +1,8 @@
# v1.8.4
## mm/dd/2018
1. [](#improved)
* Including EXIF JS library in the modules dependencies to fix orientation when uploading images
1. [](#bugfix)
* Force a `null` order when empty in the post request

View File

@@ -1,5 +1,6 @@
import $ from 'jquery';
import Dropzone from 'dropzone';
import EXIF from 'exif-js';
import request from '../../utils/request';
import { config, translations } from 'grav-config';
@@ -70,6 +71,8 @@ const DropzoneMediaConfig = {
</div>`.trim()
};
global.EXIF = EXIF;
const ACCEPT_FUNC = function(file, done, settings) {
const resolution = settings.resolution;
if (!resolution) return done();

View File

@@ -20,7 +20,7 @@ export default class SelectizeField {
let field = (isInput ? element : element.find('input, select'));
if (!field.length || field.get(0).selectize) { return; }
const plugins = $.merge(data.plugins ? data.plugins: [], ['required-fix']);
const plugins = $.merge(data.plugins ? data.plugins : [], ['required-fix']);
field.selectize($.extend({}, data, { plugins }));
this.elements.push(field.data('selectize'));

File diff suppressed because one or more lines are too long

View File

@@ -22,6 +22,7 @@
"eonasdan-bootstrap-datetimepicker": "^4.17.47",
"es6-map": "^0.1.5",
"es6-promise": "^4.1.1",
"exif-js": "^2.3.0",
"gemini-scrollbar": "^1.5.2",
"immutable": "^3.8.1",
"immutablediff": "^0.4.4",

View File

@@ -1744,6 +1744,10 @@ events@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
exif-js@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/exif-js/-/exif-js-2.3.0.tgz#9d10819bf571f873813e7640241255ab9ce1a814"
expand-brackets@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"