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

Method getFileById

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

Source from the content-addressed store, hash-verified

54 }
55
56 async getFileById(auth: AuthContext | null, id: string): Promise<UploadedFile> {
57 const organizationId = this.requireOrganizationId(auth);
58 const file = await this.filesRepository.findById(id, { organizationId });
59 if (!file) {
60 throw new NotFoundException(`File with id ${id} not found`);
61 }
62
63 return {
64 id: file.id,
65 fileName: file.fileName,
66 mimeType: file.mimeType,
67 size: file.size,
68 storageKey: file.storageKey,
69 uploadedAt: file.uploadedAt,
70 };
71 }
72
73 async downloadFile(
74 auth: AuthContext | null,

Callers 3

downloadFileMethod · 0.95
deleteFileMethod · 0.95
getFileMethod · 0.80

Calls 2

requireOrganizationIdMethod · 0.95
findByIdMethod · 0.45

Tested by

no test coverage detected