Re: Need some help creating dynamic resources from database-inputstream please!

2012-08-16 Thread Sven Meier
Take a look at DownloadLink and FileResourceStream, and replace all File related API to your CouchDB access. Sven Michael M generi...@gmail.com schrieb: Hi, in my project I use a CouchDB with files as attachments. Currently I have a page that makes those attachments available via a

Re: Need some help creating dynamic resources from database-inputstream please!

2012-08-16 Thread Michael M
Hi, thanks for for quick answer! I already played around with ResourceStreams, but my problem was that I couldn't do the bridge from a Stream to a Resource with a URL. I should add, I'm not offering my ByteArrayResources as a download. I pass the content-type and filename, and (with the help I

Re: Need some help creating dynamic resources from database-inputstream please!

2012-08-16 Thread Michael M
I think I just made a huge step forward by overriding getData() of ByteArrayResource. I've read that in the documentation before, but at that time was too deep into the concept of resources that I didn't get it (I'm completely new to Wicket). So, right now it works that I read my attachment,

Re: Need some help creating dynamic resources from database-inputstream please!

2012-08-16 Thread Michael M
Ok I think I got it now! Simply using a ResourceStreamResource instead of a ByteArrayResource, duh... I think the reason why I just couldn't see clear before is all the different obsolete examples and tutorials for older versions. The problem is, when you are new to Wicket, you are still figuring