36
Views
1
Comments
REST API
Application Type
Reactive

What is the JSON format to send XML file as attachment. It should be a key-value pair where key is the xml-file and the value should be to select files so that we can upload the xml file. How can we get this interface of key-value wherein you can upload the file. How can we do this in OutSystems

2019-01-07 16-04-16
Siya
 
MVP

If you are planning to expose a REST API in OutSystems to receive XML file and its content you could follow the below steps.

  1. Define a Structure XMLFile (Name (text), Content (text)) .
  2. Expose REST API- > New Method -> Uploadfile having input parameter of type XMLFile.
  3. Implement Server action to handle the received file.

Please note that Content is Base64 encoded content from the caller. You may store it as is or convert to original form before storing / processing it.  


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.