We have huge list of images that we need to store in an external path.. i.e outside of play application folder.
How can we make it available to play as an asset so i
You've probably seen Play's documentation about Assets. Additionally to Play's standard assets you can define your own.
In conf/routes
you need to add a line for your external asset:
# Static resources (not managed by the Play framework)
GET /my_external_assets/*file controllers.ExtAssets.at(file)
# Play's standard assets
GET /assets/*file controllers.Assets.at(path = "/public", file)
And then you have to define your assets controller. A simple example how it could be done:
public class ExtAssets extends Controller {
public Result at(String filePath) {
File file = new File(filePath);
return ok(file, true);
}
}