Skip to content

Commit

Permalink
Fix move pictures to perm folder issue (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmartineau authored Jun 16, 2020
1 parent 2a217c4 commit 7a0a42a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/pictures/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const generateBlur = (path) => {
});
};

const moveWineToPermanentFolder = (context) => () => (
const moveWineToPermanentFolder = (context) => (
thumbnailFilePath,
pictureFilePath
) => {
Expand All @@ -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),
Expand Down

0 comments on commit 7a0a42a

Please sign in to comment.