I am working on API creation for mobile app and need to create API to upload a user profile pic. But when I am trying to get uploaded image here in post request it’s showing empty body request. I am using this.request.body.file to get an image but it’s showing undefined. Do I need to install any other package to get uploaded image? This is my code i write in app\server\server.js file
Router.route('/api/uploadimage/', { where: 'server' })
.post(function () {
let response;
console.log(this.request.body.file);
this.response.setHeader('Content-Type', 'multipart/form-data');
this.response.end(JSON.stringify(response));
});