user3312154
user3312154

Reputation: 235

PlayFramework 2.X routing to generated content

I have a process within my play app that generates a text file. I would like to copy this text file to a directory where i can then view it from a static route. In production mode, the public assets folder is jar'd up, Is there a directory I can place my files into where I can route to them in prod mode.

Upvotes: 0

Views: 25

Answers (1)

user3312154
user3312154

Reputation: 235

Thanks for confirming m-z, I ended up rolling my own solution which is hopefully secure.... In my Global application class , I store a file location, which is then accessible by my controllers. The controllers simply read the file(s) into a Buffered REader, then spit them back out. using OK.sendFile(string).

thanks ,

Upvotes: 0

Related Questions