Summary

When I try to download files from Decision Time, it just downloads corrupt docx files. I am not sure whether this is user error (probably by the document uploader) or a system error, but I fixed it.

Issue

When downloading a .docx file from Decision Time as a meeting attendee, the file is corrupt and cannot be opened (or opens with warnings). The document can still be viewed in the web interface. This means that people who rely on a screen reader cannot view the file with their preferred software, and also prevents sharing the documents with others.

Other document types such as PDF are also affected but PDF viewers ignore the leading newline, so it does not actually show an error.

Solution

I investigated the file and found that a newline character is erroneously inserted at the start of the file. I have created a Firefox extension to fix it by automatically removing the extra newline when you download the file (if you downloaded a corrupt copy before, you will need to download it again before it works).

If you do not want to use the extension, follow these steps:

  1. Download the file.
  2. Rename it to end in .txt.
  3. Open it in a plain text editor such as Notepad.
  4. The file will start with a blank line, then the letters PK, then lots of nonsense characters. Remove the blank line so that the file starts immediately with PK.
  5. Save your changes and rename the file to end with .docx again.