playframework - Asset mapping outside public folder on Play framework -
we have huge list of images need store in external path.. i.e outside of play application folder.
how can make available play asset streams web server?
you've seen play's documentation assets. additionally play's standard assets can define own.
in conf/routes
need add line external asset:
# static resources (not managed play framework) /my_external_assets/*file controllers.extassets.at(file) # play's standard assets /assets/*file controllers.assets.at(path = "/public", file)
and have define assets controller. simple example how done:
public class extassets extends controller { public result at(string filepath) { file file = new file(filepath); return ok(file, true); } }
Comments
Post a Comment