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:
- Go to curriculum editor in a course
- Open a target and click on "attach files"
- Select a png and upload
- 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.