Skip to content

Fix blob binary state detection for preloaded files

Vasilii Iakliushin requested to merge 351559_fix_binary_file_detection into master

What does this MR do and why?

Contributes to #351559 (closed)

Problem

Blob does not refresh binary status without an explicit blob.load_all_data! call.

Solution

Recalculate binary status if the data was already preloaded.

Screenshots or screen recordings

Before After
Screenshot_2022-07-08_at_16.11.15 Screenshot_2022-07-08_at_16.10.22

How to set up and validate locally

  1. Enable feature flags refactor_blob_viewer and highlight_js
  2. Visit http://127.0.0.1:3000/gitlab-org/gitlab-test/-/blob/binary-encoding/encoding/binary-1.bin

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vasilii Iakliushin

Merge request reports

Loading