Skip to content

fix(gitlab): load LFS media content#7815

Open
JackSpiece wants to merge 1 commit into
decaporg:mainfrom
JackSpiece:3704-gitlab-lfs-media
Open

fix(gitlab): load LFS media content#7815
JackSpiece wants to merge 1 commit into
decaporg:mainfrom
JackSpiece:3704-gitlab-lfs-media

Conversation

@JackSpiece
Copy link
Copy Markdown

Summary

Fixes #3704.

GitLab now supports resolving repository raw file requests through LFS with the lfs=true parameter. 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 false
  • npm run test:unit -- packages/decap-cms-backend-gitlab/src/__tests__/API.spec.js packages/decap-cms-backend-gitlab/src/__tests__/gitlab.spec.js --runInBand
  • npx 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.js
  • npx 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.js
  • git diff --check

Checklist

@JackSpiece JackSpiece requested a review from a team as a code owner May 19, 2026 12:36
Copy link
Copy Markdown
Contributor

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JackSpiece, good work! I am not used to GitLab but the code LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Git-LFS support to the GitLab backend

2 participants