Hi Cesar,

The values for blob/clob seem to be returned by RO viewer in the form of
(filename):(mime type):(binary data in base64). I guess you have to split
the parts then format the mime type and base64 data correctly before using
as source in an img tag.


Best regards,
Willie



On Wed, Nov 25, 2015 at 4:08 AM, Cesar Lugo <[email protected]>
wrote:

> Hello,
>
>
>
> I am trying to display an image in a JavaScript client app, the image
> comes from an Isis RO web service as a string, but it won't show, just
> shows like a broken image. I found out that the format to properly display
> an image in HTML (<img>) is in a base64 format like this example:
>
>
>
> "data:image/jpeg;base64,/9j//4AAQSkZJRgABAQEAlgCWAAD/  ...."
>
>
>
> but the JSON message has the image as a string in this format:
>
>
>
> "Tacos.jpg:image/jpeg:/9j//4AAQSkZJRgABAQEAlgCWAAD/  ...."
>
>
>
> so, for testing purposes, I saved a copy of the JSON message and published
> it in a web server, changing the string to match the base64 format shown
> above in the JSON file, then posted a GET to that JSON file. When I did
> that and read the JSON message, it worked just fine, displaying the image
> in my JavaScript client app.
>
>
>
> Do you know if there is anything I should do to change the message, or the
> way JDO stores the property so it matches the base64 format?
>
>
>
> Cesar.
>
>
>
>
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>

Reply via email to