fix(gitlab): load LFS media content#7815
Open
JackSpiece wants to merge 1 commit into
Open
Conversation
yanthomasdev
approved these changes
May 19, 2026
Contributor
yanthomasdev
left a comment
There was a problem hiding this comment.
Thanks @JackSpiece, good work! I am not used to GitLab but the code LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3704.
GitLab now supports resolving repository raw file requests through LFS with the
lfs=trueparameter. This updates the GitLab backend so media reads request LFS content instead of the pointer file when generating display URLs, downloading media, and loading unpublished-entry media.Normal entry reads keep their existing request shape. LFS reads use a separate cache key suffix so a pointer response and resolved media blob cannot collide under the same GitLab file id.
Test plan
npm run type-check -- --pretty falsenpm run test:unit -- packages/decap-cms-backend-gitlab/src/__tests__/API.spec.js packages/decap-cms-backend-gitlab/src/__tests__/gitlab.spec.js --runInBandnpx eslint --color --ignore-path .gitignore packages/decap-cms-backend-gitlab/src/API.ts packages/decap-cms-backend-gitlab/src/implementation.ts packages/decap-cms-backend-gitlab/src/__tests__/API.spec.js packages/decap-cms-backend-gitlab/src/__tests__/gitlab.spec.jsnpx prettier --check packages/decap-cms-backend-gitlab/src/API.ts packages/decap-cms-backend-gitlab/src/implementation.ts packages/decap-cms-backend-gitlab/src/__tests__/API.spec.js packages/decap-cms-backend-gitlab/src/__tests__/gitlab.spec.jsgit diff --checkChecklist