Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31925

File Attachments Downloaded From Assignment Submissions Corrupt

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2, 2.2.1
    • Fix Version/s: None
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Testing Instructions:
      Hide

      Create an Online Assignment in Moodle 2.1. Using the html editor upload a video file, and insert it into the submissions text area. Save the activity and view the assignment. The video will fail to play, because the file is corrupt.

      Show
      Create an Online Assignment in Moodle 2.1. Using the html editor upload a video file, and insert it into the submissions text area. Save the activity and view the assignment. The video will fail to play, because the file is corrupt.
    • Workaround:
      Hide

      Currently I have created my own cut down version of pluginfile.php that I call from my own assignment type. I don't like it because it is not as secure, but for now I have no alternative.

      Show
      Currently I have created my own cut down version of pluginfile.php that I call from my own assignment type. I don't like it because it is not as secure, but for now I have no alternative.
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      When you upload a non text file into an assignment, and later download that file, the file has two new line characters added at the beginning of the byte stream corrupting the file. I have done a lot of testing, because I thought the bug was mine. The file is uploaded correctly and somewhere after pluginfile.php branches processing depending on the activity type, and before the send_stored_file function is called the new line characters are appended. I could not find the location myself, though I tried.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: