Options
All
  • Public
  • Public/Protected
  • All
Menu

File representation to unify file object in nodejs and browser

export
class

File

Hierarchy

  • File

Index

Constructors

constructor

Properties

container

container: string

handle

handle: string

key

key: string

status

status: FileState

uploadTags

uploadTags: UploadTags

url

url: string

workflows

workflows: any[]

Accessors

customName

  • set customName(val: ((file: this) => string) | string): void
  • Sets custom name using string or function Name will be sanitized

    memberof

    File

    Parameters

    • val: ((file: this) => string) | string

    Returns void

filename

  • get filename(): string

mimetype

  • get mimetype(): string

name

  • get name(): string
  • set name(val: string): void

size

  • get size(): number

type

  • get type(): string

Methods

getChunkByMetadata

getPartByMetadata

getPartMetadata

getPartsCount

  • getPartsCount(size: number): number
  • Returns number of parts according to part size

    memberof

    File

    Parameters

    • size: number

      part size in bytes

    Returns number

release

  • release(): void

toJSON

  • toJSON(): { handle: string; name: string; size: number; status: FileState; type: string; uploadTags: UploadTags; url: string }