Reputation: 41665
I want localhost/assets/abc.png file to be served from project_root/assets/abc.png
GET /assets/*file controllers.Assets.at(path="/public", file)
With the routes above, localhost/assets/abc.png won't be served( I couldn't find a way)
but localhost/assets/images/abc.png will be served from root/assets/images/abc.png.
Upvotes: 1
Views: 703
Reputation: 16439
Add the following entry at the bottom of routes
:
# Serves only abc.png from root public folder
GET /$file<abc.png> controllers.Assets.at(path="/public", file)
That said, if you have multiple files to serve like this, better put them in a subfolder
Upvotes: 2