文件上传点睛

阅读更多
grails文件上传点睛
def webRootDir = servletContext.getRealPath("/")
      def userDir = new File(webRootDir, "/payload/${session.user.login}")
      userDir.mkdirs()
      uploadedFile.transferTo( new File( userDir, uploadedFile.originalFilename))
      entryInstance.filename = uploadedFile.originalFilename


http://www.chineselinuxuniversity.net/articles/25701.shtml

你可能感兴趣的:(file,grails,upload)