Resolve "Snippets actions with binary data"
What does this MR do?
We do not currently support editing of binary data in Snippets so it will raise an error if someone attempts to view the form. This MR modifies the edit and update actions for Snippet controllers (Personal and Project) so that if someone attempts to edit/update a Snippet whose blob has binary data (i.e. an image) it will redirect them to the show action instead.
The show view is being modified separately (#212592 (closed)) to disable the edit button, so this MR is to cater for users who navigate directly to the edit or update paths.
Conformity
-
Changelog entry -
Documentation ([if required](https://docs.gitlab.com/ee/development/documentation/workflow.html#when-documentation-is-required)) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Closes #212662 (closed)
Edited by 🤖 GitLab Bot 🤖