MCPcopy Create free account
hub / github.com/ShipSecAI/studio / downloadFile

Method downloadFile

backend/src/storage/files.service.ts:73–81  ·  view source on GitHub ↗
(
    auth: AuthContext | null,
    id: string,
  )

Source from the content-addressed store, hash-verified

71 }
72
73 async downloadFile(
74 auth: AuthContext | null,
75 id: string,
76 ): Promise<{ buffer: Buffer; file: UploadedFile }> {
77 const file = await this.getFileById(auth, id);
78 const buffer = await this.storageService.downloadFile(file.storageKey);
79
80 return { buffer, file };
81 }
82
83 async listFiles(auth: AuthContext | null, limit = 100): Promise<UploadedFile[]> {
84 const organizationId = this.requireOrganizationId(auth);

Callers

nothing calls this directly

Calls 2

getFileByIdMethod · 0.95
downloadFileMethod · 0.65

Tested by

no test coverage detected