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

jQuery File Upload

  • Tags: /
  • Latest: 0.2
  • Last Updated: 13 August 2011
  • Grails version: 1.3.7 > *
  • Authors: null
0 vote
compile "org.grails.plugins:jquery-file-upload:0.2"




grails install-plugin jquery-file-upload


Provides common resources for and helper tags.

To add basic jquery plugin resources, add the tag <jqfu:resources tmpl=”false” /> tag to the HEAD of your template. And place <jqfu:resources url=”_URL_” /> in the content of your view. The url parameter specify the action URL that actually stores the file in your app. It must return an JSON collection of a maps for each file stored. A returned file map must return at least the file name and file size of the stored file. For example:

def upload = {
   Collection result = []
   Binary binary
   request.getFileNames().each {
     binary = Binary.storeMyFileMethod(request.getFile(it))
     result << [name: binary.getFileName(), size: binary.getFileSize()]
   render result as JSON

The jQuery File Upload plugin uses the the jQuery.tmpl plugin to render the user actions. In the above example we turned the jQuery template engine off as the plugin provided an js rendering extension to work out of the box. If you set the “tmpl” parameters in the resources tag, the jQuery.tmpl plugin will be added and you must create your own jquery template.

See for more details.