aboutsummaryrefslogtreecommitdiff
path: root/src/api/utils
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-10-12 14:58:58 +0900
committerPitu <[email protected]>2019-10-12 14:58:58 +0900
commit459ab5433b9c3b60f43f9b2293189be8e29e0e84 (patch)
tree86b32eb5e6ba30a7b1e1f37b18cdc5ed2cb8423c /src/api/utils
parentchore: wizard was a stupid name, it's setup (diff)
downloadhost.fuwn.me-459ab5433b9c3b60f43f9b2293189be8e29e0e84.tar.xz
host.fuwn.me-459ab5433b9c3b60f43f9b2293189be8e29e0e84.zip
chore: remove exif strip support.
After some thought, modifying uploaded files is not something I want to support.
Diffstat (limited to 'src/api/utils')
-rw-r--r--src/api/utils/Util.js15
1 files changed, 0 insertions, 15 deletions
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)