Reputation: 267177
It seems that if you have play running in production mode, and any new images are added to the public/images
directory, the Assets.at()
method does not detect these new images until Play has been stopped and restarted from the console.
Is there any way to force the Assets controller to refresh/recompile the list of assets while in production mode? Or do I have to write my own controller for serving up images? (If so, is there one already written to do this that I can reuse?)
Upvotes: 3
Views: 789
Reputation: 21564
You will have to write your own action for your uploaded pictures.
The Assets
controller is a controller that serves static resources which are bundled within your application.
You can find a very simple (and low tech) example of an action for retrieving a picture here (I think you'll get the idea).
Upvotes: 2