This section describes how to add file format detection, so that only image files are routed to Media Server.
To add file format detection
Add a processor, by dragging the processor icon from the components toolbar to the canvas.
The Add Processor dialog box opens.
In the Source list, click idol.nifi.
Select the KeyViewRouteOnFileType processor and click ADD.
The processor is added to the canvas.
Click the queue between the KeyViewExtractFiles and KeyViewFilterDocument processor.
The queue is selected and handles appear so that you can modify the route.
Right-click the KeyViewRouteOnFileType processor and click Configure.
The Configure Processor dialog box opens.
Add a new property to route image files. With this processor, each property you create defines a new relationship (for more information, see the documentation for the KeyViewRouteOnFileType processor).
Click Add property .
The Add Property dialog box opens.
Type a name for the property, for example images
, and click OK.
Another dialog box opens, so that you can set the value of the property.
5,83,143,238
and click OK. These numbers are KeyView format codes (5 for BMP files, 83 for TIFF, 143 for JPEG, and 238 for PNG).Click APPLY.
Create a connection between the KeyViewRouteOnFileType processor and the KeyViewFilterDocument processor.
The Create Connection dialog box opens.
In the For Relationships area, select the unmatched and unknown check boxes:
Click ADD.
The connection appears on the canvas. Any FlowFile that is processed successfully but does not represent a BMP, TIFF, JPEG, or PNG file is now routed to the KeyViewFilterDocument processor (as before). FlowFiles that represent one of the image formats are no longer routed to the KeyViewFilterDocument processor because you did not select the images relationship.
The next section describes how to add media analysis to process the image files.