File preview showing incorrect file contents

Jump to solution
Community Champion

I'm having an issue with the file preview feature of Canvas not showing the correct contents of text files.

Here's an example:

On a Canvas Page, I have linked several text files (which I have uploaded to the Canvas Files area):


If I now click on the file preview for world2.txt, I see:


Similarly, if I click on the world2.txt link, I see:


However, when I download the file and open it up, I get:


The downloaded version is correct (compared to what I uploaded to Canvas Files).

There are two issues with the preview versions:

1) The preview is adding a period (.) after some of the numbers which are not present in the existing text file. This is annoying, but the purposes of what I am doing in my course, ok (since 4 and 4. represent the same number in the program my students are using)

2) The preview versions are missing some lines and show a line that is not in the file!!! Specifically, the preview has

4. 4

5. 6  <--- line not in the actual file!

6. 4

while the actual file contains

4 4

4 5 <--- missing from preview!

5 6 <--- missing from preview!

6 4

This is a much more serious problem. What's going on? How can I make Canvas' preview show the actual contents of my text files?

1 Solution
Community Champion

This is a bug in Canvas. I have reported it to the extent that my institution allows me to.

View solution in original post