feat: GitLab LFS Support (#346)

This commit is contained in:
Frank Elsinga 2023-01-14 06:01:19 +01:00 committed by GitHub
parent 8be590ea89
commit 41fd5fd33c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -221,7 +221,7 @@ export default class API {
const fetchContent = async () => {
const content = await this.request({
url: `${this.repoURL}/repository/files/${encodeURIComponent(path)}/raw`,
params: { ref: branch },
params: { ref: branch, lfs: 'true' }, // lfs=true means that even if the file is stored in LFS, return the content
cache: 'no-store',
}).then<Blob | string>(parseText ? this.responseToText : this.responseToBlob);
return content;

View File

@ -79,3 +79,7 @@ backend: {
},
```
</CodeTabs>
## Git Large File Storage (LFS)
The GitLab backend **does** support [git-lfs](https://git-lfs.github.com/).