Appending text in base64 - Integration Call

Certified Lead Developer

We are trying to pass doument as base64 in one of our integration call. we followed https://docs.appian.com/suite/help/19.1/Integration_Object.html#examples to make it work. But the interesting part is, we have to append a text to the base64 everytime we send this document as a base 64.

{
"Name": "AAA",
"Address": "BBB"
Photo: todocument(6745)
}

works but as per our service provide we will have to add a text as a prefix to the base 64 that looks like "data:image/jpeg;base64,"

When we attempted

{ 
"Name": "AAA", 
Address: "BBB", 
Photo: "data:image/jpeg;base64," & todocument(6745) 

}

The base64 generation hasn't happened as appending text convert the entire attribute to text before base64 conversion happens. Any suggestions on handling this?

At the moment we are approaching towards building a custom expression that generates base 64 upfront so that we could perform concatenation. but we would like to understand if there is a better way to do this,

Thanks in advance,

Arjun.

  Discussion posts and replies are publicly visible