Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Multipart PDF sent as a binary instead of base64 format

SA-83011

Summary



The Pega application does not send a multipart or form-data REST request with a document in the base64 encoded format (as set in the pyAttachValues property) along with a JSON request. Instead, the PDF is sent in the binary format.


Error Messages



Not Applicable


Steps to Reproduce

  1. Populate the pyRequestAttachmentPage with the below properties:

    pyAttachValues – This contains the base64 encoded string of the PDF
    pyAttachNames – This is set to the form-data element name
    pyAttachFileNames – This is the file name
    pyAttachTypes – This is set as multipart or form-data

     
  2. Create a REST-Connector with a POST request configured to send a JSON request.


Root Cause



The pyAttachTypes was set as 'multiform/form-data' in the pyRequestAttachmentPage.


Resolution



Perform the following local-change:
  1. Set the pyAttachTypes as 'text/plain'.
  2. Removing the pyAttachFileNames setting.

Published August 15, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us