This commit is contained in:
barisusakli
2014-10-08 14:04:48 -04:00
parent 4dcecbb310
commit 61c73b7761
2 changed files with 2 additions and 2 deletions

View File

@@ -493,7 +493,7 @@ accountsController.uploadPicture = function (req, res, next) {
return; 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) { fs.unlink(absolutePath, function (err) {
if (err) { if (err) {

View File

@@ -18,7 +18,7 @@ file.saveFileToLocal = function(filename, folder, tempPath, callback) {
is.on('end', function () { is.on('end', function () {
callback(null, { callback(null, {
url: nconf.get('upload_url') + filename url: nconf.get('upload_url') + folder + '/' + filename
}); });
}); });