isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cesar Lugo <cesar.l...@sisorg.com.mx>
Subject RE: FW: RO web service with image string property
Date Wed, 25 Nov 2015 23:52:24 GMT
Hi Willie,

Yes, it's perfect. I did that and the image shows just fine. Thank you!

Cesar.

-----Original Message-----
From: Willie Loyd Tandingan [mailto:tandingan.wlb@gmail.com] 
Sent: Wednesday, November 25, 2015 11:43 AM
To: users@isis.apache.org
Subject: Re: FW: RO web service with image string property

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 <cesar.lugo@sisorg.com.mx>
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
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Mime
View raw message