Skip to content

Web IDE: Remove property `binary` on the file object.

The binary attribute is primarily used to determine if we should show a download viewer or image viewer for a file. It comes from the backend for files that are committed, and we do it on the frontend for uncommitted files by using isTextFile util function.

This difference in implementation also leads to bugs sometimes. (For instance, a download viewer is shown for an image that is loaded from an MR).

Proposal

Remove the binary attribute, and use isTextFile wherever necessary to tell if the file is binary or not.