# How to use the elasticsearch Attachment Processor with node.js

**URL:** <https://discuss.elastic.co/t/how-to-use-the-elasticsearch-attachment-processor-with-node-js/173609>\
**Category:** Elasticsearch\
**Created:** [March 23, 2019, 5:36pm UTC](https://discuss.elastic.co/t/how-to-use-the-elasticsearch-attachment-processor-with-node-js/173609 "2019-03-23T17:36:28Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Joao\_D\_Junior](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joao_d_junior/32/42635_2.png) [@Joao\_D\_Junior](https://discuss.elastic.co/u/Joao_D_Junior)\
**Post date:** [March 23, 2019, 7:13pm UTC](https://discuss.elastic.co/t/how-to-use-the-elasticsearch-attachment-processor-with-node-js/173609/5 "2019-03-23T19:13:57Z")

</div>

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.

---

_[View the full topic](https://discuss.elastic.co/t/how-to-use-the-elasticsearch-attachment-processor-with-node-js/173609)._
