On Sat, 26 Jan 2013 11:20:56 -0200, René Bernhardsgrütter
<rene.bernhardsgruet...@gmail.com> wrote:
You are right, it doesn't seem to be a problem.
So, it it the common way to serve user content files (uploaded images,
etc.) via a StreamResponse in a page that reads the files from the
harddrive?
You can also use events for that, but I think is only the best solution
when you only need to server files in one page. The page-based solution is
more reusable and yields better URLs.
For example: /content/[fileid] returns an image that's embedded into the
page. And in the template, it's just '<img src="/content/1234" />'.
You can do that. It'll work, but I think there are better ways of doing
that.
Or how should that be done?
Right now, out of the box, Tapestry doesn't provide a component for the
<img> tag, but you could easily do that. Please file a JIRA about it.
Meanwhile, use the PageRenderLinkSource service to generate the urls and
pass them to the src attribute of <img>. Or, better yet, create a
component that encapsulates this logic.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org