diff --git a/modules/item/back/methods/item-image-queue/downloadImages.js b/modules/item/back/methods/item-image-queue/downloadImages.js index b8a03e1c1b..bee5492bc2 100644 --- a/modules/item/back/methods/item-image-queue/downloadImages.js +++ b/modules/item/back/methods/item-image-queue/downloadImages.js @@ -48,7 +48,11 @@ module.exports = Self => { const srcFile = image.url.split('/').pop(); const dotIndex = srcFile.lastIndexOf('.'); - const fileName = srcFile.substring(0, dotIndex); + + let fileName = srcFile.substring(0, dotIndex); + if (dotIndex == -1) + fileName = srcFile; + const file = `${fileName}.png`; const filePath = path.join(tempPath, file);