fix: #7634, make strip exif configurable

This commit is contained in:
Barış Soner Uşaklı
2019-05-23 20:38:49 -04:00
parent a8409fbd49
commit 157b921e14
4 changed files with 11 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ var winston = require('winston');
var file = require('./file');
var plugins = require('./plugins');
var meta = require('./meta');
var image = module.exports;
@@ -92,7 +93,7 @@ image.size = function (path, callback) {
};
image.stripEXIF = function (path, callback) {
if (path.endsWith('.gif')) {
if (!meta.config.stripEXIFData || path.endsWith('.gif')) {
return setImmediate(callback);
}
async.waterfall([

View File

@@ -20,6 +20,13 @@
</label>
</div>
<div class="checkbox">
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input class="mdl-switch__input" type="checkbox" data-field="stripEXIFData">
<span class="mdl-switch__label"><strong>[[admin/settings/uploads:strip-exif-data]]</strong></span>
</label>
</div>
<div class="form-group">
<label for="privateUploadsExtensions">[[admin/settings/uploads:private-extensions]]</label>
<input type="text" class="form-control" value="" data-field="privateUploadsExtensions" placeholder="">