mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +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);
|
||||
},
|
||||
function (fileObj, next) {
|
||||
next(null, { url: fileObj.url });
|
||||
console.log(fileObj);
|
||||
next(null, {
|
||||
url: fileObj.url,
|
||||
name: fileObj.name,
|
||||
});
|
||||
},
|
||||
], callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user