mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
fix urls
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user