You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to do a multipart/form-data request in Visual Builder

Received Response
67
Views
2
Comments
edited Jan 28, 2019 1:53PM in Visual Builder 2 comments

Summary

Doing a multipart/form-data request to upload a file to Content and Experience Cloud

Content

Hi, 

I am trying to upload a picture to Content and Experience Cloud using the Rest API in Visual Builder. 

The reference for the Rest API of Content and Experience Cloud can be found in this link https://docs.oracle.com/en/cloud/paas/content-cloud/rest-api-documents/op-documents-api-1.2-files-data-post.html. As it can be seen it requires the body of the request to be of the type multipart/form-data. 

I managed to upload pictures to Content and Experience Cloud using Postman. Now I'm trying to achieve the same using a mobile app in visual builder. For this, I defined a service connection and I'm calling it an action change after the takephoto action. However, I don't manage to get this to work. I'm also finding some problems on how to debug: I need to try it on the phone every time and I don't know how to check the HTTP request sent and the status of the response, I only know that the picture is not uploaded. 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!