Sign in to edit and +1 items.
Login required
Download

Session Temp Files

(0)
Author(s) fletcherr
Current Release 1.0   (2 years ago)
Grails Version 1.1 > *
Tags file upload 
Dependency
compile ":session-temp-files:1.0"
Last updated by admin 2 years ago
grails install-plugin session-temp-files
Last updated by fletcherr 2 years ago

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.

getTempDir()

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 java.io.File.createTempDir

Change Log

1.0

Initial version.

Contact

Source code for the plugin is hosted on GitHub. Please send any questions or suggestions to rob@energizedwork.com.
Last updated by admin 2 years ago
Last updated by admin 2 years ago