Created on 10-05-201805:51 PM - edited 08-17-201906:14 AM
Posting Images with Apache NiFi 1.7 and a Custom Processor
I have been using a shell script for this since Apache NiFi did not have a good way to natively post an image to HTTP servers su such as the model server for Apache MXNet.
So I wrote a quick and dirty processor that posts an image there and gathers the headers, result body, status text and status code and returns them to you as attributes.
In this example I am download images from picsum.photos free photo service.
92696-postimagenififlow.png
To use this new processor, download to your lib directory and restart Apache NiFi, then you can add the PostImageProcessor.
92697-addpostimageprocessor.png
Eclipse For Building My Processor
92698-nifihttppost.png
Configure the Post Image Processor with your URL, fieldname, imagename and image type.