REST.xxxDocuments.UploadDocuments xxxx - Setting header "Content-Type" to configured value "appication/form-data" .Is it possible to download the log from server and provide us, from this log I did not find much.
Just for additional info. I'm working on 8.2.2 version.
I have followed the below steps as posted by one of the community member.
We have implemented the same using multipart form data and type binary. We used the Pega default feature to add an attachment to work object. We created a button in actions tab configured event on click to perform the following in sequence, calling Local Action pyAttachContent, Set Value of .pyAttachmentType to "File", Calling an activity , Refreshing the harness.
In the activity we are calling the OOTB activity AttachFile and in the next step we are calling the connect rest activity.
1)pyAttachNames(n) [This contains the parameter to be passed eg. name, file etc.];
2)pyAttachTypes(n) [This contains the content-type eg. application/json etc. ]. This should NOT be set to "multipart/formdata"
3)pyAttachValues(n) [This contains the binary data of the file to be passed] the value is SampleFile.pyAttachStream,
4)pyAttachFileNames(n) [This contains the entire file name with extension] the value is SampleFile.pxAttachName
We call the Connect rest with this page in clipboard and the file gets send along with the request.