diff --git a/server/pictures/services.js b/server/pictures/services.js index 3521cbf0..2793b600 100644 --- a/server/pictures/services.js +++ b/server/pictures/services.js @@ -59,7 +59,7 @@ const generateBlur = (path) => { }); }; -const moveWineToPermanentFolder = (context) => () => ( +const moveWineToPermanentFolder = (context) => ( thumbnailFilePath, pictureFilePath ) => { @@ -78,6 +78,7 @@ const moveWineToPermanentFolder = (context) => () => ( const fileExtension = path.extname(pictureFileName); const newFileName = [uuidv4(), fileExtension].join(''); const permPictureFileNamePath = path.resolve(context.PERM_DIR, newFileName); + let promises = [ fs.rename(tempThumbnailFileNamePath, permThumbnailFileNamePath), fs.rename(tempPictureFileNamePath, permPictureFileNamePath),