I'm developing a plugin for Elasticsearch. The plugin uses the BaseRestHandler to add some new HTTP endpoints. One of this endpoints is used by an Android app. The app sends some information to the plugin which then creates a new document in Elasticsearch based on the received information. That works well up to here. But now I want to send some images (jpg) made by the android app to the HTTP endpoint of the Elasticsearch plugin. The goal is that the plugin stores the images somewhere and creates a Elasticsearch document with the paths of the stored files.
I think files are uploaded with HTTP by using multipart requests. Is it possible to get the individual files from the content of the received Elasticsearch RestRequest?
I'm also open to other ideas if you have one
Thanks in advance!