Close popover
Riadh Ziri (Riadh)
IRIZ Consulting

IRIZ Consulting
Riadh Member since 2015 2 posts
IRIZ Consulting
Posted: September 7, 2018
Last activity: October 1, 2018

Sending attachment as multipart in connect REST not working


I need to transfer a document from Pega to an external system through Connect REST as multipart/form-data.

I have gone through all the threads on community that talk about this topic (there are quite a few already). I have followed all the steps mentioned in those threads and in the Help:

- Creating a page pyRequestAttachmentPage of class Data-ServiceMessage

- Set properties .pyAttachNames(1), .pyAttachValues(1), .pyAttachTypes(1) and .pyAttachFileNames(1)

- The POST Request part in my Connect REST is empty as I just need to send the document and nothing else.

Attached is the debug traces when invoking the connector created. We can clearly see that it found pyRequestAttachmentPage when preparing the request, but the file field is empty and as it is a mandatory field, the service is returning "Parameter 'file' required" error message.

Isn't Pega supposed to populate that field automatically with the multipart data or have I misunderstood the way it is supposed to work?

Anything wrong or missing in this approach?

Any known issue (and therefore any available fix) on this part?

*** this is urgent as we have to implement this as part of a PoC with a propsect next tuesday***



***Edited by Moderator Marissa to update SR Details***

Data Integration Support Case Exists
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.