From 61c73b7761f61359fee0c60bc70ab421e1af6d06 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 8 Oct 2014 14:04:48 -0400 Subject: [PATCH] fix urls --- src/controllers/accounts.js | 2 +- src/file.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/accounts.js b/src/controllers/accounts.js index 4846ae6839..06f2edd9b9 100644 --- a/src/controllers/accounts.js +++ b/src/controllers/accounts.js @@ -493,7 +493,7 @@ accountsController.uploadPicture = function (req, res, next) { return; } - var absolutePath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), path.basename(oldpicture)); + var absolutePath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), 'profile', path.basename(oldpicture)); fs.unlink(absolutePath, function (err) { if (err) { diff --git a/src/file.js b/src/file.js index eb0ba7f1b2..9433dfb40b 100644 --- a/src/file.js +++ b/src/file.js @@ -18,7 +18,7 @@ file.saveFileToLocal = function(filename, folder, tempPath, callback) { is.on('end', function () { callback(null, { - url: nconf.get('upload_url') + filename + url: nconf.get('upload_url') + folder + '/' + filename }); });