Index an image using ingest-attachment via Postman

I'm trying to test indexing a tiff image using the ingest-attachment plugin.

First, does Elasticsearch's Tika implement parsers for image formats? I realise that they'll only get metadata, but that's all I want for now.

Second, how can I POST an image to ES using Postman? My request is formed like this:
URL:
my_server:9200/{{$index}}/{$type}}/{{$docid}}?pipeline=attachment
Headers:
Content-Type=application/json
Body:
?? Do I use 'binary' and upload the image here? Do I then use a pre-request script to convert it to ascii encoded base64?? How would I do that? Or do I do the conversion elsewhere and paste it into a json document?

Do I then use a pre-request script to convert it to ascii encoded base64??

Yes. You need to do that BASE64 transformation on your side and then create a JSON document which contains it.

Alternatively you can use FSCrawler with its REST API mode and then you can upload a binary file directly like:

curl -F "file=@myimage.png" "http://127.0.0.1:8080/fscrawler/_upload"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.