How to pass a file, its metadata and additional attributes in multipart/form-data Connect-Rest post body?
The service I am trying to connect accepts selective content type. It requires file in multipart form-data, while the filename, extension, folderid in text. Referring to the post
https://collaborate.pega.com/question/how-pass-file-form-data-connect-rest-post-method-body
I have set the 4 required properties for file on page pyRequestAttachmentPage on index 1, for the remaining additional data I have added subsequent values in the value list properties as:
pyAttachNames(2): "extension" pyAttachValues(2):@Base64Encode("txt") pyAttachTypes(2):"application/text"
and so on for others.
In Pega with the above configuration, I am facing 500 error code Failed to convert value of type 'org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile' to required type 'java.lang.String'; nested exception is java.lang.IllegalStateException