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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -