Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
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 upload a image into Content and Experience Cloud using it's REST API

edited Aug 1, 2019 8:40PM in Content Management 1 comment

Summary

I am trying to upload an image into Content and Experience Cloud using it's REST API

Content

Below is the payload which i am using to upload a text file, which works fine. Now my question is how do i upload an image file with the same payload.

Should the content of the image be encoded or what does the API accept? Any suggestions please?

 

Code Snippet

-----1234567890
Content-Disposition: form-data; name="jsonInputParameters"

{"parentID":"F7D2E128D47B268D46726140E0DE0255F6C149D47067"}
-----1234567890
Content-Disposition: form-data; name="primaryFile"; filename="example.txt"
Content-Type: text/plain

<FileContent>'This is Text' 
-----1234567890--

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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