From f40151699b292eb917c6d55fc04331d932186187 Mon Sep 17 00:00:00 2001 From: cguertuerk Date: Sun, 30 Dec 2018 16:02:01 +0100 Subject: [PATCH] Fixes #3 --- src/image.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/image.js b/src/image.js index 3e3fada..1b0ffca 100644 --- a/src/image.js +++ b/src/image.js @@ -15,7 +15,8 @@ exports.resize = (imageBucket, objectKey, width, height) => new Promise((resolve getFile(imageBucket, objectKey, reject).then(data => { - const resizedFile = `${os.tmpDir}/resized.${imageBucket}.${objectKey}.${width}.${height}`; + const normalizeObjectKey = objectKey.split('/').join('.'); + const resizedFile = `${os.tmpDir}/resized.${imageBucket}.${normalizeObjectKey}.${width}.${height}`; const resizeCallback = (err, output, resolve, reject) => { if (err) {