mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
Append file name to the JSON payload returned
... during file upload process... closes #6486
This commit is contained in:
@@ -95,7 +95,11 @@ function uploadAsFile(req, uploadedFile, callback) {
|
|||||||
uploadsController.uploadFile(req.uid, uploadedFile, next);
|
uploadsController.uploadFile(req.uid, uploadedFile, next);
|
||||||
},
|
},
|
||||||
function (fileObj, next) {
|
function (fileObj, next) {
|
||||||
next(null, { url: fileObj.url });
|
console.log(fileObj);
|
||||||
|
next(null, {
|
||||||
|
url: fileObj.url,
|
||||||
|
name: fileObj.name,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
], callback);
|
], callback);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user