Displaying image retrieved by java code as binary string

Displaying image retrieved by java code as binary string

  
we are trying to disply an image retrieved from a java code as a binary data type but un able to know how to disply it over the web page.
Hi Murad,

What error are you getting? Is this related with your other post here? (http://www.outsystems.com/forums/discussion/13919/expression-is-too-long/)

Cheers,
Guilherme

Hello Guilherme;

   thanks for your replay, yes its related to it, i have solved the upper issue and got stuck  in the next one. :/

Regards;
Murad

Hi Murad,

That's why we are here, to try and help you :)

But for that we'll need a little bit more of detail. What kind of error are you getting? Do you have a screenshot of what you're getting?

Cheers,
Guilherme
Thanks alot, its really appreciated :)
i attached the OML File, the image appears as a little box with an "X" mark on it :/
i tried to save the binary stream into an entity and use the image widget, i  get the same result.

thanks in advance :)

Hi Murad,

The problem seems to be because you're not closing the escaping string when using the data URI scheme.
Just add this in red and you should be fine.

"<img src=""data:image/png;base64,"+ BinaryToBase64.Base64 +"""/>"

Cheers,
Guilherme

Dear Guilherme;

   thanks for your fast reply, well yeah your right! but still it gives me that the page is loading then it seems as if it went through a time out and the attachment appears,

regards;

Hi Murad,

That screen could be a lot of things (timeout while loading the image, network problems etc)...

If you go into the management console what do you see in the error logs?

Can I also suggest you try the attached espace? Its a variation of yours but loading an image from the espace resources because I don't have access to your web services. You can also check it working here

If it works I suggest you including your code bit by bit and debuging in order to see if the image is correctly loaded, the size, etc...

Hope it helps,
Guilherme
thanks alot :)
its highly appreciated :)