Hi Stefan,

we used to have a similar issue here and solved it by transferring the
image(-data) in the RPC-response as base64 encoded...

<code class="PHP">
if ($includeImageInResponse === true)
{
  // base64 encode the image and include it as data url:
  $base64image = base64_encode($rawImage);
  return "<img src='data:image/gif;base64,$base64image'>";
} else {
  return $imgUrl;
}
</code>
Although this is PHP, you might get the idea

In the (qooxdoo-)frontend we just apply the returned value to the pane via
<code class="JavaScript">
  container.setBackgroundImage(result.url);
</code>

Maybe it helps,
  Peter


On 2010-07-14 13:13 Stefan Andersson wrote:
> In Java ServletOutputStream is suggested to be used in the server to stream 
> an image to a response body in a page.
> 
> How would you do it with qooxdoo? Is it possible to stream directly without 
> any file storage on the server? How is that done?
> 
> the Image class allows to set the source of the image but is there a way to 
> transmit a response body whereto the ServletOutputStream can write?
> 
> Then the file is not available to anyone, as if there is an image link. A 
> situation where this is interesting is getting a rendered captcha image from 
> the Java server by streaming.
> 
> Thanks in advance!
> 
> Stefan


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to