Hello,

use a IResourceStream that returns the DB bytes as stream.
Then you can set this stream as new RequestTarget after a click.

new Link("clickMe") {
  void onClick() {
    IResourceStream s = .... {
      @Override
      InputStream getInputStream() { ...from DB...}
      void close() { ...close stream... }
      String getContentType() { ...optional let wicket guess or "image/jpg"
etc.... }
    };
    
    getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(s) //
opt. setFileName("") )
}}






Martin Makundi wrote:
> 
> Hi!
> 
> I have bytes[] stored in the db LONGBLOB column.
> 
> How do I make a clickable link for downloading the contents?
> 
> **
> Martin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Upload-ok---how-about-downloading-a-bytestream--tp17444881p17447605.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to