diff --git a/server/routes/photos.js b/server/routes/photos.js index 499ed09..d5a10eb 100755 --- a/server/routes/photos.js +++ b/server/routes/photos.js @@ -149,7 +149,7 @@ router.put("/:id", function(req, res/*, next*/) { return rename(picturesPath + asset.path + src, picturesPath + asset.path + asset.filename).then(function() { return rename(picturesPath + asset.path + "thumbs/" + src, picturesPath + asset.path + "thumbs/" + asset.filename); }).then(function() { - return rename(picturesPath + asset.path + src, picturesPath + "thumbs/scaled/" + asset.path + "thumbs/scaled/" + asset.filename); + return rename(picturesPath + asset.path + "thumbs/scaled/" + src, picturesPath + asset.path + "thumbs/scaled/" + asset.filename); }).then(function() { return photoDB.sequelize.query("UPDATE photos SET filename=:filename WHERE id=:id", { replacements: asset