Implements

Constructors

Properties

bucket: string
client: Client
log: Debugger = ...
objects: {
    name: string;
    size: number;
}[] = []

cached array of objects that are stored in the s3 bucket

Type declaration

  • name: string
  • size: number
publicURL: undefined | string = undefined

Methods

  • Parameters

    • sha256: string
    • Optional type: string

    Returns string

  • Parameters

    • sha256: string

    Returns undefined | {
        name: string;
        size: number;
    }

  • get the MIME type of the blob if the storage knows it

    Parameters

    • sha256: string

    Returns undefined | string | Promise<undefined | string>

  • check if blob exists in storage

    Parameters

    • sha256: string

    Returns Promise<boolean>

  • returns the blob contents as a Readable stream

    Parameters

    • sha256: string

    Returns Promise<Readable>

  • save blob

    Parameters

    • sha256: string
    • stream: Readable | Buffer
    • Optional type: string

    Returns Promise<void>