Member since
09-28-2017
1
Post
0
Kudos Received
0
Solutions
09-29-2017
01:45 PM
This worked well for me: I think you need to add a part on the MultipartEntity containing the FileBody which name should be "template" val templateFile = new File(templatePath)<br>if(!templateFile.exists() || !templateFile.isFile) None<br>else{<br> val multipartEntity = MultipartEntityBuilder.create().addPart("template", new FileBody(templateFile))<br> .setContentType(ContentType.MULTIPART_FORM_DATA).build()<br><br> val post = new HttpPost(nifiBaseUrl.concat(s"/process-groups/${processGroupId.getOrElse("root")}/templates/upload"))<br><br> post.setEntity(multipartEntity)<br> Some(post)
... View more