Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FileFromDB

Hierarchy

Index

Constructors

constructor

Properties

app

app: App

Optional data

data: Readable

filename

filename: string

Optional id

id: undefined | string

Optional mime_type

mime_type: undefined | string

Methods

getDataPath

  • getDataPath(): string
  • Returns string

getMimeType

  • getMimeType(): string
  • Returns string

getStream

  • getStream(): null | ReadStream
  • Returns null | ReadStream

getURL

  • getURL(): string
  • Returns string

save

  • save(): Promise<this>
  • Returns Promise<this>

toDBEntry

Static fromData

  • fromData(app: App, buffer: Buffer | string): Promise<File>
  • Parameters

    • app: App
    • buffer: Buffer | string

    Returns Promise<File>

Static fromID

  • Parameters

    • app: App
    • id: string

    Returns Promise<FileFromDB>

Static fromPath

  • Parameters

    • app: App
    • path: string

    Returns Promise<FileFromPath>

Generated using TypeDoc