The above request is created using soapUI. When I add a query parameter in my connect rest, it appends the parameter in query string. I need it to be send in the message body. Please suggest a way to achieve this.
Along with the file I have to send the value of this element (FormElement) which is one of the fields needed during the file upload. I tried to include this as a query parameter but then this gets appended in the url (like below) not appears in the body as above.
POST <scheme>://<host>:<port>/<path>/upload?FormElement=3543253252 HTTP/1.1
You are mistaken. The posts are talking about setting up the request attachment page so that Pega will create a multipart message as part of the request. Pega's connector does not currently provide a UI for setting up multipart messages, so populating the request attachment page is the method by which the mutlipart message is constructed.
Sorry for the confusion but I am not talking about any UI for setting up the multipart messages. My rest connector has to achieve the functionality of a browser file upload as mentioned in https://www.soapui.org/rest-testing/understanding-rest-parameters.html. Along with file content, I have to pass a field call "FormElement" which is sort of an identifier of the the uploaded file.