I am using loopback3 for file storage attachment.js and i have the persistedmodel career.js for storing the data. Now i want to fetch the file name in the career.js. how to do this.
career.js
'use strict';
const app = require('../../server/server');
module.exports = function(Career) {
Career.afterRemote('create', function(context, remoteMethodOutput, next) {
next();
// console.log(context.result)
Career.app.models.Email.send({
to: 'john@gmail.com',
from: 'noreply@gmail.com',
subject: 'Career Form',
html: '<em>Hi,</em>'
},
function(err, mail) {
// console.log(context.result.email)
console.log('email sent!');
console.log(err);
});
});
attachment.js
'use strict';
module.exports = function(Attachment) {
};