Can you use the ExternalAssets controller?
http://www.playframework.com/documentation/api/2.1.x/scala/index.html#controllers.ExternalAssets$
-James
On 07/12/2013 08:52 AM, Michel Schinz wrote:
> Hi everyone,
>
> I'm writing a Play application (in Scala) that must authenticate users
> and then, depending on their role and identity, serves them static HTML
> files (no templating at all, no access to a database, etc). Play's
> Assets controller /almost/ does what I want, except that it only serves
> files from the application's resources, not from an arbitrary location
> in the file system, as I would like.
>
> I don't want to put the HTML files into the application, because I want
> to be able to change them without re-deploying the application.
> Additionally I'd like to allow gzipped HTML files, like Asset does, and
> have proper support for caching.
>
> Right now, it seems that my only option is to duplicate the 200+ lines
> of Assets.scala
> <
https://github.com/playframework/Play20/blob/master/framework/src/play/src/main/scala/play/api/controllers/Assets.scala>
> into my project, and change 1-2 lines, which isn't ideal. Wouldn't it be
> a good idea to factor out the code that serves local files, and build
> Assets on top of that? Or am I missing something?
>
> Thanks for your help,
> Michel.
>
> --
> You received this message because you are subscribed to the Google
> Groups "play-framework" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
play-framewor...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>