MCPcopy Create free account
hub / github.com/decaporg/decap-cms / readFile

Method readFile

packages/decap-cms-backend-gitlab/src/implementation.ts:485–489  ·  view source on GitHub ↗
(
      path: string,
      id: string | null | undefined,
      { parseText }: { parseText: boolean },
    )

Source from the content-addressed store, hash-verified

483
484 loadMediaFile(branch: string, file: UnpublishedEntryMediaFile) {
485 const readFile = (
486 path: string,
487 id: string | null | undefined,
488 { parseText }: { parseText: boolean },
489 ) => this.api!.readFile(path, id, { branch, parseText, lfs: true });
490
491 return getMediaAsBlob(file.path, null, readFile).then(blob => {
492 const name = basename(file.path);

Callers 5

getEntryMethod · 0.45
readMediaFileMethod · 0.45
API.spec.jsFile · 0.45
gitlab.spec.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected