Append file name to the JSON payload returned

... during file upload process... closes #6486
v1.18.x
Julian Lam 7 years ago
parent 24d14e8559
commit 18bde866ff

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

Loading…
Cancel
Save