[CameraHTML5] Save image like BinaryContent in my Outsystems entity and display it later
camerahtml5
Web icon
Forge component by Paul Davies
Application Type
Traditional Web

Hello,
I need to storage the image obtained in my DB and display it later using the Image Widget.

I verified my DB and a content is saved but when I tried to display the image, nothing happens.

I'm converting the OnNotify message obtained when I use the block  in BinaryData using the function TextToBinary() and later I save the output of the function in my DB.

This is an example of the binary content saved:

And the result of an expression when I cast the BinaryData into text:



But when I try to display the content like image, I do  not get the expected result and nothing is displayed.

mvp_badge
MVP

Do browsers support .jpge?

Do you see nothing at all? Or a broken image icon? Is there anything in the inspector? 

mvp_badge
MVP

Hi,

For the mentioned case, you are trying to convert the Base64 String to Binary - So, instead of using TextToBinary server action, you should use the Base64ToBinary server action for conversion. I tried the same, and it's working as expected for me.

See this demo screen: HTMLCameraDemo

Refer to the attached .oml file.


I hope this helps you!


Kind regards,

Benjith Sam

TWA_Lab_HTMLCameraDemo.oml

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