-
Himanshu Kapoor authored
In Web IDE, when you upload a file, sometimes the encoding isn't detected correctly. This change fixes fix it. 1. The changeset https://gitlab.com/gitlab-org/gitlab/commit/d1fb29e5 introduced the usage of `FileReader.readAsDataURL` for both binary and text files. The resulting base64 content is then decoded using `atob` function, which uses ASCII as its default encoding, whereas for Unicode content, UTF-8 should be the default. 2. Improvements to the download viewer. Files whose mime type cannot be detected will have their file name visible before the download button, and in the name of the downloaded file. Previously, this defaulted to the base64 uri and the file being named `download`.
f4fced86