diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/routes/files/uploadPOST.js | 8 | ||||
| -rw-r--r-- | src/api/routes/service/configGET.js | 1 | ||||
| -rw-r--r-- | src/api/utils/Util.js | 15 | ||||
| -rw-r--r-- | src/site/pages/dashboard/settings.vue | 8 |
4 files changed, 0 insertions, 32 deletions
diff --git a/src/api/routes/files/uploadPOST.js b/src/api/routes/files/uploadPOST.js index e4d13b3..5c6bcb0 100644 --- a/src/api/routes/files/uploadPOST.js +++ b/src/api/routes/files/uploadPOST.js @@ -7,7 +7,6 @@ const jetpack = require('fs-jetpack'); const Busboy = require('busboy'); const fs = require('fs'); /* - TODO: Strip exif data if the owner/user configured it as such TODO: If source has transparency generate a png thumbnail, otherwise a jpg. TODO: If source is a gif, generate a thumb of the first frame and play the gif on hover. TODO: If source is a video, generate a thumb of the first frame and save the video length. @@ -177,13 +176,6 @@ class uploadPOST extends Route { } /* - If exif removal has been force service-wide or requested by the user, remove it - */ - if (process.env.STRIP_EXIF == 'true') { // || user.settings.stripExif) { - // Util.removeExif(upload.filename); - } - - /* Generate those thumbnails */ return Util.generateThumbnails(upload.filename); diff --git a/src/api/routes/service/configGET.js b/src/api/routes/service/configGET.js index e12c57b..b653066 100644 --- a/src/api/routes/service/configGET.js +++ b/src/api/routes/service/configGET.js @@ -17,7 +17,6 @@ class configGET extends Route { albumLinkLength: parseInt(process.env.GENERATED_ALBUM_LENGTH, 10), generateThumbnails: process.env.GENERATE_THUMBNAILS == 'true' ? true : false, generateZips: process.env.GENERATE_ZIPS == 'true' ? true : false, - stripExif: process.env.STRIP_EXIF == 'true' ? true : false, publicMode: process.env.PUBLIC_MODE == 'true' ? true : false, enableAccounts: process.env.USER_ACCOUNTS == 'true' ? true : false } diff --git a/src/api/utils/Util.js b/src/api/utils/Util.js index 0251cc0..7ee32b6 100644 --- a/src/api/utils/Util.js +++ b/src/api/utils/Util.js @@ -42,21 +42,6 @@ class Util { return null; } - /* - static async removeExif(filename) { - This needs more testing. - Even though the exif data seems to be stripped, no other online service - is recognizing the file as an image file. - - const ExifTransformer = require('exif-be-gone'); - const toStream = require('buffer-to-stream'); - - const file = await jetpack.readAsync(path.join(__dirname, '..', '..', '..', process.env.UPLOAD_FOLDER, filename), 'buffer'); - const writer = jetpack.createWriteStream(path.join(__dirname, '..', '..', '..', process.env.UPLOAD_FOLDER, `${filename}.noexif`)); - toStream(file).pipe(new ExifTransformer()).pipe(writer); - } - */ - static async generateThumbnailForImage(filename, output) { const file = await jetpack.readAsync(path.join(__dirname, '..', '..', '..', process.env.UPLOAD_FOLDER, filename), 'buffer'); await sharp(file) diff --git a/src/site/pages/dashboard/settings.vue b/src/site/pages/dashboard/settings.vue index 8aea325..944c378 100644 --- a/src/site/pages/dashboard/settings.vue +++ b/src/site/pages/dashboard/settings.vue @@ -90,14 +90,6 @@ :false-value="false" /> </b-field> - <b-field label="Strip EXIF" - message="Remove EXIF metadata from uploaded files" - horizontal> - <b-switch v-model="options.stripExif" - :true-value="true" - :false-value="false" /> - </b-field> - <b-field label="Public mode" message="Enable anonymous uploades" horizontal> |