Skip to content

Remove redirection when snippet blob is binary

What does this MR do?

In this MR we removed the redirection we formerly implemented when the snippet has a binary blob.

When we implemented version control for snippets we realized that now users can push through git any kind of file to the snippet repository, and that includes binary files. We also realized that the current UI didn't handle very well these kinds of files because we will show directly the binary code to the user.

Because of that, in !28191 (merged), we decided that, if the blob stored in the snippet is binary, we will prevent users from editing and updating the snippet. It was a quick fix until we had something better in place (we also added to the docs that binary blobs weren't supported).

We also disabled the Edit button in the show page if the snippet had a binary blob.

But, this fix means that if the snippet has a binary blob and we prevent editing, users won't be able edit anything in the snippet like title, description, or visibility.

Now that we're heading towards snippets with multiple files this fix becomes more unusable because now, we would have to first retrieve all snippets and then check if any of them is binary. This is a waste of resources and it slows down the request.

We have now an epic to start dealing with binary blobs and we need to remove the fix before we enable multiple files for snippets.

The reasons for this have been decided in the group with all the counterparts involved.

Refs #225884

Does this MR meet the acceptance criteria?

Conformity

Merge request reports