Skip to content

fix(gitlab): load LFS media content#7815

Merged
martinjagodic merged 2 commits into
decaporg:mainfrom
JackSpiece:3704-gitlab-lfs-media
Jun 1, 2026
Merged

fix(gitlab): load LFS media content#7815
martinjagodic merged 2 commits 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

@yanthomasdev yanthomasdev left a comment

Copy link
Copy Markdown
Contributor

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

@martinjagodic martinjagodic enabled auto-merge (squash) June 1, 2026 14:49
@martinjagodic martinjagodic merged commit c76586b into decaporg:main Jun 1, 2026
6 checks passed
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

3 participants