How to use the elasticsearch Attachment Processor with node.js

I run via the curl this code:
PUT _ingest / pipeline / attachment { "description": "Extract attachment information", "processors": [ { "attachment": { "field": "date" } } ] } PUT my_index / _doc / my_id? Pipeline = attachment { "data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0 =" } GET my_index / _doc / my_id
but I do not know how to send my base64 pdf file to the body.