| 46 | } |
| 47 | |
| 48 | export interface TusDriver extends Driver { |
| 49 | get tusExtensions(): string[]; |
| 50 | |
| 51 | createChunkedUpload(filepath: string, context: ChunkedUploadContext): Promise<ChunkedUploadContext>; |
| 52 | finishChunkedUpload(filepath: string, context: ChunkedUploadContext): Promise<void>; |
| 53 | deleteChunkedUpload(filepath: string, context: ChunkedUploadContext): Promise<void>; |
| 54 | writeChunk(filepath: string, content: Readable, offset: number, context: ChunkedUploadContext): Promise<number>; |
| 55 | } |
| 56 | |
| 57 | export function supportsTus(driver: Driver): driver is TusDriver { |
| 58 | return 'tusExtensions' in driver; |
no outgoing calls
no test coverage detected