cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Upload document/file to BTP DMS repository failed with status 400 using Node JS CAP application

rupeshpandit1999
Explorer
0 Likes
664

Hello Experts,

We are trying to upload a document/file to BTP DMS Repository using CAP Application developed using Node JS, Below is code snippet :

rupeshpandit1999_0-1719906198758.png

rupeshpandit1999_1-1719906302940.png

rupeshpandit1999_2-1719906360865.png

rupeshpandit1999_3-1719906395652.png

rupeshpandit1999_4-1719906455829.png

rupeshpandit1999_5-1719906491287.png

rupeshpandit1999_6-1719906531264.png

rupeshpandit1999_7-1719906576466.png

we are using the above code and getting error with 400 status code on execution, by using the same URL we are able to post document to DMS repository using Business Accelerator HUB API. 

rupeshpandit1999_8-1719906804238.png

Could you please advice any solution to resolve error 400

Thanks,

Rupesh

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

MioYasutake
SAP Champion
SAP Champion

@rupeshpandit1999 

Another approach is to use cap-js/sdm plugin.

https://www.npmjs.com/package/@cap-js/sdm

rupeshpandit1999
Explorer
0 Likes

Hello @MioYasutake ,

Thank you for your suggestion!

we implemented the plug-in code in our scenario to upload document to DMS but we are getting cross origin issue as response code 500 internal server issue as seen below in the screenshot :

rupeshpandit1999_0-1721644803798.png

Could you please suggest on this issue.

Thanks,

Rupesh