jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: Storing (Image) Files in Webroot
Date Thu, 09 Jun 2011 09:48:05 GMT
On 09.06.11 09:29, "Sascha Rodekamp"
<sascha.rodekamp.lynx.de@googlemail.com> wrote:
>I upload holidayImage.jpg to /images/holiday/holidayImage.jpg the
>will store it in 
>(something like that).
>This path is unusable for my front end, when i try to load <img
>src="/images/holiday/holidayImage.jpg" />, it can't work.

Why not? You can use the JCR API to stream through the image binary for
that path.

Since that is so common, there is the Jackrabbit Webdav servlet, but even
better, Apache Sling as a web application framework on top of JCR that
does this automatically for you and a ton of other nice things to render
JCR content:


>So i want to tell the repository, that it should store my files under
>${rep.home}/datastore/images/holiday/holidayImage.jpg. Is their a way to
>implement such functionality?

That is the wrong route for many reasons. One is that the Datastore has
the concept of storing binaries by hash so the objects are immutable and
if you have the same binary multiple times in the JCR under different
paths, it's only stored once.


Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel

View raw message