Herman
Herman

Reputation: 1532

Playframework 2.2 update: where to store uploads

Starting Play 2.2 the getFile root directory is target/universal/stage/ instead of the projects root folder. In our project we uploaded files to the <root>/uploads folder. But after updating to Play 2.2 these uploads are inaccessible.

Is it desired that uploads are stored in target/universal/stage? I believe not, since those folders are created on build and we can therefore don't be sure these folders remain in place.

Upvotes: 0

Views: 58

Answers (1)

Ryan
Ryan

Reputation: 7247

Play specifically does not support this.

See this recent discussion from the mailing list: https://groups.google.com/forum/#!topic/play-framework/iHwp1FIjZbw

As noted by the Play maintainers in that discussion, a frontend server like nginx running in front of Play is the recommended approach.

Upvotes: 1

Related Questions