Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

386 B
Raw Blame
import { Readable } from 'stream';

import { DataStore } from '@tus/server';

export interface Storage {
  readonly tusStore: DataStore;
  download(path: string): Promise<{ stream: Readable; contentType?: string }>;
  delete(path: string): Promise<void>;
  upload(
    path: string,
    data: Buffer | Readable,
    contentType: string,
    contentLength?: bigint
  ): Promise<void>;
}