Append file name to the JSON payload returned

... during file upload process... closes #6486
This commit is contained in:
Julian Lam
2018-05-08 16:18:24 -04:00
parent 24d14e8559
commit 18bde866ff

View File

@@ -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);
}