You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Cesar Lugo <ce...@sisorg.com.mx> on 2015/11/24 21:08:47 UTC

FW: RO web service with image string property

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