cancel
Showing results for 
Search instead for 
Did you mean: 

SAP IRPA2.0(Cloud Studio) API Call to Upload PDF File to Document Management Service API

ankit_cc_kumar65
Explorer
836

Dear Team,

Seeking your assistance on resolving the issue. I am trying to upload a pdf file in the Document Management Service (DMS).

I am getting Response code 400 (Bad Request) error.

please find below the screenshot of Script and error.

As per DMS API reference, it only accepts uploading file in "binary" format. With that said, is there a way in iRPA to hold and convert the pdf file that I am uploading in Binary format prior performing the call? Or do you have other way of performing the call in able for the custom scripting to carry the file to be uploaded in DMS.

Any information on this is highly appreciated.

Thanks,
Ankit Kumar

Accepted Solutions (0)

Answers (2)

Answers (2)

arroyoweisson
Participant
0 Kudos

Hi Ankit,

We have a recent collaboration with the dev team. this issue has been resolved and you may check it with the recent release of documentation/sample in the irpa factory store section:

ankit_cc_kumar65
Explorer
0 Kudos

Thanks for the update my issue is resolve Now.

chwostian
Participant
0 Kudos

Hi, I don't know DMS but have you tried the same using Postman? If your web options are ok they should be working from postman too. I always check my requests in postman. This is always a confirmation that the request is valid.

After the form data add this attribute:

readFileAsBufferToBody: filePathyou might also want to add to your headers:'Accept': 'application/json', 'Content-Type': 'application/octet-stream'Let me know if it helped