Nifi docker-compose file with demo templates
- run docker-compose up
- go to http://localhost:9090/nifi
- upload template via "Operate" menu
- load template in flow
- double-click process group
- double click "QueryDatabaseTable" processor
- in properties tab: click arrow -> next to "DBCPConnectionPool" in row "Database Connection Pooling Service"
- enable the AvroReader Service by clicking the lightning icon on the right
- enable the DBCPConnectionPool Service by clicking the lightning icon on the right
- right-click both processors and select "Start"
- double-click process group
- double click "HandleHttpRequest"
- in properties tab: click arrow -> next to "StandardHttpConectMap" in row "HTTP Context Map"
- enable the "StandardHttpContextMap" Service by clicking the lightning icon on the right
- start all processors
- open curl/Postman/Insomnia and send the following json inside the body (other possible values: "second.jpg", "third.jpg") to localhost:15000/getFile:
{
"filename": "first.jpg"
}
Note: try to send another value such as "fourth.jpg" or "../../etc/passwd" to see what happens
similar to other services
Note: try to send another value such as "fourth.jpg" or "../../etc/passwd" to see what happens