Plugins You can find out about all the publicly available Grails plugins.

Session Temp Files

  • Tags: file upload
  • Latest: 1.0
  • Last Updated: 07 September 2009
  • Grails version: 1.1 > *
  • Authors: fletcherr
0 vote
compile "org.grails.plugins:session-temp-files:1.0"




grails install-plugin session-temp-files


Session Temp Files Plugin

The Session Temp Files Plugin allows an application to store temporary files bound to a user's session that will be automatically cleaned up when the session expires or is destroyed for any other reason. This can be useful for storing uploaded files during validation before moving them to permanent storage, for example. Even if the user closes the browser or otherwise exits a workflow in a way the application does not handle the files will get cleaned up when the session expires.

Dynamic Methods

The plugin binds the following additional methods to the HTTPSession class.


Returns the temp directory bound to the session creating it if it does not currently exist.

createTempFile(prefix, suffix)

Creates and returns a new temporary file in the session's temp directory. The prefix and suffix arguments are as per

Change Log


Initial version.


Source code for the plugin is hosted on GitHub. Please send any questions or suggestions to [email protected].