Ignore:
Timestamp:
Dec 15, 2009, 7:16:33 PM (10 years ago)
Author:
keesvb
Message:

changed the ISATAB upload function so that file upload works (deleted hardcoded reference to file)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/LoadController.groovy

    r64 r65  
    2222        render("Loading ...\n");
    2323
    24         File file = new File("/home/ademcan/Desktop/magetab/examples/E-GEOD-2354.idf.txt");
     24        InputStream inputStream = request.getFile("uploadfile").inputStream;
     25        BufferedReader fileReader = new BufferedReader(new InputStreamReader(inputStream));
    2526
    2627        def investigationDesign = new magetab.idf.InvestigationDesign();
     
    3536        ArrayList rows = new ArrayList();
    3637
    37         for (i in file.readLines()){
     38        for (i in fileReader.readLines()){
    3839            String line = i.toString() ;
    3940            ArrayList tmp_list = new ArrayList();
    40             List parsedTab = line.split("\t");
     41            def parsedTab = line.split("\t");
    4142
    4243            for (j in parsedTab) {
Note: See TracChangeset for help on using the changeset viewer.