UNPKG

@paperbits/common

Version:
18 lines (16 loc) 668 B
import { ReadStream } from "node:fs"; import { IBlobStorage } from "./IBlobStorage"; export interface IBlobStorageStream extends IBlobStorage { /** * Uploads specified content into storage in Node.JS * @param blobKey {string} Blob key. * @param content {ReadStream} Content stream. * @param contentType {string} Content type, e.g. `image/png`. */ uploadStreamToBlob?(blobKey: string, contentStream: ReadStream, contentType?: string): Promise<void> /** * Get blob from storage in Node.JS * @param blobKey {string} Blob key. */ getBlobAsStream?(blobKey: string): Promise<NodeJS.ReadableStream> }