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

Force Downloading Controller's Response in Browser

  • Tags: content download
  • Latest: 0.1.5
  • Last Updated: 05 April 2013
  • Grails version: 1.1 > *
0 vote

The plugin forces browser to open a dialog for downloading content produced within controller's action. Although the theory says that this is easily controlled by specifying Content-Disposition HTTP header, the practice shows that there are special situations (ofcourse) with IE that has to be handled properly.

Controllers are extended with forceDownload method that takes as parameters a Map specifying download options, and a object containing content:

forceDownload(filename:"file", contentType:"... Read more

Dependency :
compile "org.grails.plugins:force-response-download:0.1.5"

 Documentation  Source