Upload image with form widget and send by email

Upload image with form widget and send by email

Hello, 
I have a blueprint dashboard with a form widget. There is an upload file field and I want to trigger an analysis with submit button that send this file by email.
I have this:
  1. const attachment = scope.find(x=> x.variable === 'attachment')
    await email_service.send({
    to: 'email',
    subject: 'Title',
    attachment: {
    filename: attachment?.metadata?.file?.path,
    archive: attachment?.metadata?.file?.path,
    },
    message: 'Message',
    }
    1. ).then(context.log).catch(context.log);

The problem is that the attached file arrives empty to the receiver. Any idea?