pupilfirst / pupilfirst

A learning management system (LMS) that lets you run an asynchronous online school, where learning is achieved through focused tasks, directed feedback, an iterative workflow, and community interaction.

Home Page:https://www.pupilfirst.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to upload PNG files

reenas opened this issue · comments

Describe the bug
Uploading a .png file does not work on LMS. The preview is empty and on clicking the uploaded file there is XML error:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>InvalidArgument</Code>
<Message>Header value cannot be represented using ISO-8859-1.</Message>
<ArgumentName>response-content-disposition</ArgumentName>
<ArgumentValue>inline; filename="Screenshotxx.png";</ArgumentValue>
<RequestId>requestxx</RequestId>
<HostId>hostxx</HostId>
</Error>

Upload of jpg files works correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to curriculum editor in a course
  2. Open a target and click on "attach files"
  3. Select a png and upload
  4. Click on the uploaded file and see error.

Expected behavior
The PNG image should be uploaded.

@reenas This seems to be happening because of Unicode characters (non-Latin characters) in the filename. The workaround for now is to remove non-Latin chars from the filename. I'll work on a proper fix.