mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 18:26:15 +01:00
Fix #5416, uploads path config setting
- Finish moving uploads route to `/assets/uploads` - Remove `upload_url` config setting, it was broken
This commit is contained in:
@@ -86,7 +86,7 @@ module.exports = function (SocketUser) {
|
||||
function (userData, next) {
|
||||
if (userData.uploadedpicture && !userData.uploadedpicture.startsWith('http')) {
|
||||
var pathToFile = path.join(nconf.get('base_dir'), 'public', userData.uploadedpicture);
|
||||
if (pathToFile.startsWith(path.join(nconf.get('base_dir'), nconf.get('upload_path')))) {
|
||||
if (pathToFile.startsWith(nconf.get('upload_path'))) {
|
||||
require('fs').unlink(pathToFile, function (err) {
|
||||
if (err) {
|
||||
winston.error(err);
|
||||
|
||||
Reference in New Issue
Block a user