Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

soa 12c: Upload file using rest adapter

ABABJun 4 2020

Hello,

We have a requirement where we need to upload a pdf file by calling a rest api.

API only accepts 'multipart/form-data' requests with a single PDF named “file” as the only form contents..

Here is an example http request

POST /api/files/ID/pdfs/ HTTP/1.1

Host: abcd.myhost.com

api_key: my_key

Content-Type: multipart/form-data; boundary=----FormBoundaryXXXXXXXX

cache-control: no-cache

Content-Disposition: form-data; name="file"; filename="/path/to/my-file.pdf"

------FormBoundaryXXXXXXXX--

Does rest adapter support multipart/form-data ? If yes then can you please suggest how to achieve it using rest adapter ?

Thanks,

AB    

Comments

Post Details

Added on Jun 4 2020
7 comments
1,131 views