[xwiki-devs] insert a link to a dynamic image
Hello, i have a groovy script that generates an xwiki table from an LDAP nodes listing. In the node is a picture (jpeg as a byte[]), and i wonder how i can display this byte[] as a picture. I tried to understand how charting plugin does this job (have template generate a picture that is later queried by browser) but i didn't understand the principle. Can someone explain me how to do this? David Delbecq
Hi, One solution you have is to use the data URI scheme to and write the image data stream right into the HTML. Check out http://en.wikipedia.org/wiki/Data_URI_scheme#HTML Or alternatively you could create a temporary file, and serve this image as I believe the charting plugin does. Cheers, Jerome On Wed, Jun 27, 2012 at 5:56 PM, David Delbecq <[email protected]>wrote:
Hello,
i have a groovy script that generates an xwiki table from an LDAP nodes listing. In the node is a picture (jpeg as a byte[]), and i wonder how i can display this byte[] as a picture. I tried to understand how charting plugin does this job (have template generate a picture that is later queried by browser) but i didn't understand the principle.
Can someone explain me how to do this?
David Delbecq
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jérôme Velociter Winesquare http://www.winesquare.net/
considering serving a temporary file, that's more or less what i wanted to do. However, i have no idea how i can server a file in xwiki. In only know how i can create page content. Where do you put, in xwiki, code that serves a file instead of a wiki content? David Delbecq ----- Mail original ----- De: "Jerome Velociter" <[email protected]> À: "XWiki Developers" <[email protected]> Envoyé: Mercredi 27 Juin 2012 19:41:30 Objet: Re: [xwiki-devs] insert a link to a dynamic image Hi, One solution you have is to use the data URI scheme to and write the image data stream right into the HTML. Check out http://en.wikipedia.org/wiki/Data_URI_scheme#HTML Or alternatively you could create a temporary file, and serve this image as I believe the charting plugin does. Cheers, Jerome On Wed, Jun 27, 2012 at 5:56 PM, David Delbecq <[email protected]>wrote:
Hello,
i have a groovy script that generates an xwiki table from an LDAP nodes listing. In the node is a picture (jpeg as a byte[]), and i wonder how i can display this byte[] as a picture. I tried to understand how charting plugin does this job (have template generate a picture that is later queried by browser) but i didn't understand the principle.
Can someone explain me how to do this?
David Delbecq
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jérôme Velociter Winesquare http://www.winesquare.net/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (2)
-
David Delbecq -
Jerome Velociter