Skip to content

Do not show LFS object when LFS is disabled

Christopher Bartz requested to merge cbartz/gitlab-ce:feature/custom-lfs into master

What does this MR do?

Prevents that a 404 is shown, when trying to download a LFS file (inside the project file browser) not managed by GitLab (instead by a custom LFS server). If lfs_enabled is set to false in the config file, the lfs pointer file is directly shown as text.

Why was this MR needed?

To support more flexibility. Git-LFS should not only be bound to the GitLab LFS Server, but it should also be possible to use alternative implementations, especially for connecting to a custom cloud storage (which is not already supported by GitLab natively), because this is a big benefit when using Git-LFS (that large files can be stored outside in "cheaper" storages).

Screenshots

Before: gitlab-lfs-before gitlab-lfs-before-2 After: gitlab-lfs-after

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #28817 (closed)

Merge request reports