Ignore:
Timestamp:
Jun 24, 2011, 3:26:20 PM (8 years ago)
Author:
robert@…
Message:
  • Fixed nullpointer bug in querying
  • Changed order of classification buttons
  • Added content-length to file downloads
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/nl/tno/massSequencing/AssaySampleController.groovy

    r71 r73  
    126126                def processId = params.processId;
    127127               
    128                 // Export the sequences and quality scores
    129                 response.setHeader "Content-disposition", "attachment; filename=" + session.process[ processId ].name  + ".zip"
     128                // Retrieve the file
     129                def file = fileService.get( session.process[ processId ].filename );
     130
    130131                try {
    131                         response.outputStream << fileService.get( session.process[ processId ].filename ).newInputStream();
     132                        // Send the file to the user
     133                        response.setHeader "Content-disposition", "attachment; filename=" + session.process[ processId ].name  + ".zip"
     134                        response.setHeader "Content-Length", file.size().toString();
     135                       
     136                        response.outputStream << file.newInputStream();
    132137                        response.outputStream.flush();
    133138                } catch( Exception e ) {
Note: See TracChangeset for help on using the changeset viewer.