Convert From base 64 to Image In K2

534 Views Asked by At

How do I go about converting a Base64 encoded string to an Image and display on a Picture control in K2?

I tried using a webservice, then on i used something to link and nothing shows up.

1

There are 1 best solutions below

0
Dragan Panjkov On

I would recommend that you take that Base64 string, create expression (Text, Concatenate from Context browser) where you would compose IMG that should look like this:

<img src='data:image/jpeg;base64, <!-- base64 data -->' />

or in Expression syntax:

Concatenate(<img src='data:image/jpeg;base64,,<!-- base64 data -->,' />)

and in the end, you would create a DataLabel control on your form, enable its Literal property (checkbox in properties) and assign the expression you created above to that DataLabel.