Hi Jens,
thanks for answer. No, not really what i want.
I would like to write in my .tml
<img src="${asset:myasset:images/image.jpg}" alt="image"/>
which renders something like:
<img src="/myassets/images/image.jpg" alt="image">
and take a file from the filesystem by a defined path.
I think for that the ExternalUrlAssetFactory is not doing what i want
and i have to deal with my own impl of AssetFactory and Resource.
In the meantime i found a solution from Lance which do similar what i want:
http://stackoverflow.com/questions/30478306/tapestry-load-image-asset-from-filesystem
But i think more and more it is better to use an image server for that
issue.
Kind regards (also to Bobby)
David
On 10.05.2016 12:16, Jens Breitenstein wrote:
Hi David!
If I look at the classes implementing AssetFactory there is
ExternalUrlAssetFactory, maybe this is what you want
(file:///your-dir/your-asset.png)?
AssetModule.java configures all context asset factories so you have to
contribute
configuration.add("file", new ExternalAssetFactory("file"))
in your module, too. I have to admit, I did not test it, just browsing
the T5.4 sources.
Jens
Am 10/05/16 um 08:53 schrieb D.R.:
Hi @all,
i need a new asset domain to have access to the filesystem.
In the doc http://tapestry.apache.org/assets.html
they say you "may define a new AssetFactory and contribute it to the
AssetSource service configuration"
I have no idea how to deal with the two methods. Please help. What i
have to do in Order to get access to files on my filesystem?
public AssetFactory buildAssetFactory()
{
return new AssetFactory(){
@Override
public Asset createAsset(Resource arg0)
{
return null;
}
@Override
public Resource getRootResource() {
return null;
}
};
}
Kind regards
David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org