I have a Nifi flow where a document file eg/pdf, doc etc is sent from a REST API to a Nifi ListenHTTP processor. The processor is configured to accept all headers. Here is my problem
Steps to reproduce:
expected result: The downloaded file should be named 'hello-world.pdf'
actual result: The downloaded file is named 'hello-world'
However, if I use a HandleHttpRequest processor followed by a HandleHttpResponse processor I get the expected result.
Does anybody know why the ListenHttp processor does not give me the expected result?
The solution is to add an 'update attribute' processor with an attribute
key mime.type
value ${Content-Type}
This is because the HttpListener processor does not write this header by default.