我正在尝试通过Nifi invokeHTTP使用box api将文件上传到Box中
我能够使用邮递员进行上传,并尝试在Nifi InvokeHTTP属性中复制cURL。但是收到错误消息“由于未找到多部分边界,因此请求被拒绝”
如何在InvokeHTTP处理器中将边界值传递给“ Content-Type”?
curl -X POST \
https://upload.box.com/api/2.0/files/content \
-H 'Authorization: Bearer YXXXXXXXXXXXXXXXXXX' \
-H 'Content-Type: multipart/form-data; boundary=--------------------------044837558017023342962729' \
-H 'Cookie: box_visitor_id=5d1df6ab8c6781.68299959; site_preference=desktop' \
-H 'Host: upload.box.com' \
-H 'Postman-Token: d3a8b995-d3d7-473b-a117-981b22a72e69,9ca8ce6e-fe32-445b-b2c7-6722b4777a96' \
-H 'User-Agent: PostmanRuntime/7.15.2' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F file=@/C:/Users/xxxxxxx/Desktop/test.txt \
-F 'attributes={"name":"test.txt", "parent":{"id":"0"}}'
以下是当前处理器配置 InvokeHTTP configuration 1 InvokeHTTP configuration 2