[Grails](groovy)--如何實作將下載頁面程式及解決下載檔案名稱亂碼問題
程式如下:
def file =newFile(params.fileDir)
response.setContentType("application/octet-stream")
response.setHeader("Content-disposition","attachment;filename=${file.getName()}")
response.outputStream << file.newInputStream()// Performing a binary stream copy