How to display an image if I have entered a base64 value as an input?

0
I would like to take a base64 value as an input from the user, then have the corresponding image displayed on the app. This is how my domain model looks like    I've created this microflow where I create an Image Object, and commit it and try displaying it on a new page   I take base64 values as inputs from the user. The microflow is called when the 'Save' button is clicked     I would like the image to be displayed in the Dynamic Image Widget     Running the above app doesn't give me any output, and just stops itself after an error message. Can someone advise where am I going wrong?        
asked
2 answers
0

Have a look at the error logs in the Studio Pro console if you are running this locally. It should say what is going wrong. 

 

I would also suggest checking the return value of Base64 Decode to File. It should return true if it was able to decode the image. If it's false, you could handle this error and return a suitable error message to the user.

 

Good luck!

answered
0

image.pngThis is what I see as an error that the source file is null for the JavaAction.

 

image.png

 

This is how the JavaAction has been set.

answered