I have a bunch of public assets that I would like to zip and provide for download.
Is there an easy way in Play! to create a zip for a list of files/folders?
I have a bunch of public assets that I would like to zip and provide for download.
Is there an easy way in Play! to create a zip for a list of files/folders?
I suppose you can always use Java libraries. See JavaDocs for details
play war "project_dir" -o "war_file_name" --zip
Note: I'm using Play-1.2.3
In the controller use this:
Then add this to your routes file:
Note that file paths are from your application root, not your file system root.
You can use Play helper class, Files.zip