Hierarchy (view full)

Constructors

Properties

_extension: string
_file: undefined | File
_hash?: string
_name: string
_size: number
_type: string
_url?: string

Accessors

  • get extension(): string
  • extension including the dot. (this must contain a dot!)

    Returns string

  • get hash(): undefined | string
  • Returns undefined | string

  • set hash(value): void
  • Parameters

    • value: undefined | string

    Returns void

Methods

  • Parameters

    • httpClient: any

    Returns Promise<string>

  • Parameters

    • fullname: string

    Returns {
        extension: string;
        name: string;
    }

    • extension: string
    • name: string
  • creates a FileInfo instance form a URL. It doesn't contain the file itself.

    Parameters

    • url: string
    • Optionaltype: string
    • Optionalname: string
    • createdAt: number = 0
    • Optionalsize: number

    Returns FileInfo

  • Parameters

    • file: File
    • Optionalencoding: string

    Returns Promise<string>

  • Parameters

    • content: string
    • filename: string
    • Optionaltype: string

    Returns File

  • Parameters

    • extension: string

    Returns
        | "audio/wav"
        | "audio/mpeg"
        | "audio/ogg"
        | "audio/opus"
        | "video/mp4"
        | "image/png"
        | "image/jpg"
        | "application/pdf"
        | "application/json"
        | "text/plain"

  • Parameters

    • file: File
    • newName: string
    • attributes: any

    Returns Promise<File>