Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-29928

Certain zip files do not upload correctly

    Details

    • 11 status:
      Merge
    • 10 status:
      Merge

      Description

      We found that zip files created on certain Ubuntu distributions did not upload correctly into Assignments Upload All feature.

      Unfortunately we cannot share the problematic zip file as it contains student data, and could not easily create another zip file with generic data to demonstrate the problem.

      Debugging and investigation showed that this code in AssignmentAction was corrupting the file:

      tmpFileOut = new FileOutputStream(tempFile);
      writeToStream(fileContentStream, tmpFileOut);
      tmpFileOut.flush();
      tmpFileOut.close(); 
      

      i.e. the temporary file on disk was not byte-identical to the uploaded file, and subsequent processing of it by the zip libraries failed.

      The typical UI error is "Alert: ZIP file is not in correct format. Please ensure there is a grade file and correct folder structure."

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                maintenanceteam Core Team
                Reporter:
                smarquard Stephen Marquard
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code