Changeset 1761


Ignore:
Timestamp:
Apr 12, 2011, 2:36:36 PM (6 years ago)
Author:
s.h.sikkema@…
Message:

assay excel export now writes to a temporary file first to prevent memory issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/studycapturing/AssayController.groovy

    r1752 r1761  
    55        def assayService
    66        def authenticationService
     7    def fileService
    78
    89        static allowedMethods = [save: "POST", update: "POST", delete: "POST"]
     
    200201                try {
    201202
    202                         assayService.exportRowWiseDataToExcelFile(session.rowData, response.outputStream)
    203                         response.outputStream.flush()
     203            def file = fileService.get('tempAssayExportFile')
     204            def os = file.newOutputStream()
     205
     206                        assayService.exportRowWiseDataToExcelFile(session.rowData, os)
     207                        os.flush()
     208
     209            response.outputStream << file.newInputStream()
     210
     211            file.delete()
    204212
    205213                } catch (Exception e) {
Note: See TracChangeset for help on using the changeset viewer.