nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nattaphol Lertpaibulpanya <>
Subject How to upload a file by using InvokeHTTP (multipart/form-data)?
Date Mon, 01 Apr 2019 06:46:22 GMT


I try to use InvokeHTTP processor to upload a file and got some error. I had a HTTP POST message
that I tested by using Postman and everything ok.

I try to implement in NIFI but I cannot change the Content-Type by using UpdateAttribute processor
as I searched in the internet. Nifi still used the default value as Picture1 and I guess it
produced the error in the Picture2 due to it could not find the username field that I sent
in the flowfile content as a multipart/form-data.

What I did wrong?

Nattaphol L.

POST /xxx/dropfile/ HTTP/1.1
Host: xxx
Cache-Control: no-cache
Postman-Token: 21171a40-f903-aea3-3fda-49092758f5ce
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

Content-Disposition: form-data; name="username"

Content-Disposition: form-data; name="file"; filename="xxx.json"
Content-Type: application/json





Picture3: content in the flow file

Sent from Outlook<>

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message