From 4ef540c8f3e8b94dfedca96574a8e67122a69feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20S=C3=A1nchez?= Date: Tue, 18 Aug 2020 09:48:02 +0200 Subject: [PATCH] Changed download path --- back/models/image.js | 3 +-- modules/item/back/methods/item-image-queue/downloadImages.js | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/back/models/image.js b/back/models/image.js index f1eb09c9e..340b2e5a6 100644 --- a/back/models/image.js +++ b/back/models/image.js @@ -4,8 +4,7 @@ const path = require('path'); module.exports = Self => { Self.getPath = function() { - // return '/var/lib/salix/image'; - return 'C:\\Users\\jsanc\\Desktop\\image'; + return '/var/lib/salix/image'; }; Self.registerImage = async(collectionName, file, srcFilePath) => { diff --git a/modules/item/back/methods/item-image-queue/downloadImages.js b/modules/item/back/methods/item-image-queue/downloadImages.js index f295f420e..bd22bc281 100644 --- a/modules/item/back/methods/item-image-queue/downloadImages.js +++ b/modules/item/back/methods/item-image-queue/downloadImages.js @@ -20,9 +20,7 @@ module.exports = Self => { const models = Self.app.models; try { - /* const tempPath = path.join('/tmp/salix-image'); */ - const rootPath = models.Image.getPath(); - const tempPath = path.join(rootPath, 'temp'); + const tempPath = path.join('/tmp/salix-image'); // Create temporary path await fs.mkdir(tempPath, {recursive: true});