Arquivo PDf
18/06/2015 16:04
def downloadBook = {df\"")
def file = new File("c:/seuarquivo.pdf")
response.setHeader("Content-Type", "application/octet-stream;")
response.setHeader("Content-Disposition", "attachment;filename=\" [code]seuarquivo.p
def downloadBook = {e ai vc coloca
def file = new File("c:/temp/seuarquivo.pdf")
response.setHeader("Content-Type", "application/octet-stream;")
response.setHeader("Content-Disposition", "attachment;filename=\" seuarquivo.pdf\"")
response.setHeader("Content-Length", "${file.size()}")
response.outputStream << file.text.bytes
}
<g:link action="downloadBook " ><img " SUA IMAGEM"></img></g:link>
Para se registrar, clique aqui.