Rename thumbs and scaled on image action=rename

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-10-20 18:47:46 -07:00
parent 501657031c
commit 1671719c25

View File

@ -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 + src, picturesPath + asset.path + asset.filename).then(function() {
return rename(picturesPath + asset.path + "thumbs/" + src, picturesPath + asset.path + "thumbs/" + asset.filename); return rename(picturesPath + asset.path + "thumbs/" + src, picturesPath + asset.path + "thumbs/" + asset.filename);
}).then(function() { }).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() { }).then(function() {
return photoDB.sequelize.query("UPDATE photos SET filename=:filename WHERE id=:id", { return photoDB.sequelize.query("UPDATE photos SET filename=:filename WHERE id=:id", {
replacements: asset replacements: asset