# Elasticsearch - mapper attachment plugin

**URL:** <https://discuss.elastic.co/t/elasticsearch-mapper-attachment-plugin/41450>\
**Category:** Elasticsearch\
**Created:** [February 11, 2016, 4:30am UTC](https://discuss.elastic.co/t/elasticsearch-mapper-attachment-plugin/41450 "2016-02-11T04:30:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meenal.Luktuke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meenal.luktuke/32/7795_2.png) [@Meenal.Luktuke](https://discuss.elastic.co/u/Meenal.Luktuke)\
**Post date:** [February 11, 2016, 4:30am UTC](https://discuss.elastic.co/t/elasticsearch-mapper-attachment-plugin/41450/1 "2016-02-11T04:30:04Z")

</div>

Hi,

I'm trying to index big document with ES and Mapper Attachment plugin. In the configuration below:

PUT /test-mapping/person/1  
{  
"my\_attachment" : {  
"\_name" : "/home/ubuntu/test.pdf",  
"\_language" : "en",  
"\_content" : "... base64 encoded attachment ..." ---\> Do I have to input bas64 encoded content of the complete file? Is there any other way?  
}  
}

If there are multiple files, what is the solution to handle this? First convert all the file content to base 64 and then write curl PUT for all the files in a script?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 11, 2016, 8:18am UTC](https://discuss.elastic.co/t/elasticsearch-mapper-attachment-plugin/41450/2 "2016-02-11T08:18:03Z")

</div>

> Do I have to input bas64 encoded content of the complete file?

Yes.

> Is there any other way?

Extract yourself on the client side your text using Tika.

Also have a look at this new feature and the comments on the PR itself: [https://github.com/elastic/elasticsearch/pull/16490](https://github.com/elastic/elasticsearch/pull/16490)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:17pm UTC](https://discuss.elastic.co/t/elasticsearch-mapper-attachment-plugin/41450/3 "2017-07-05T23:17:18Z")

</div>


