(filesId: ObjectId, n: number, data: Uint8Array)
| 228 | } |
| 229 | |
| 230 | function createChunkDoc(filesId: ObjectId, n: number, data: Uint8Array): GridFSChunk { |
| 231 | return { |
| 232 | _id: new ObjectId(), |
| 233 | files_id: filesId, |
| 234 | n, |
| 235 | data |
| 236 | }; |
| 237 | } |
| 238 | |
| 239 | async function checkChunksIndex(stream: GridFSBucketWriteStream): Promise<void> { |
| 240 | const index = { files_id: 1, n: 1 }; |
no outgoing calls
no test coverage detected