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

url

url: string

workflows

workflows: any[]

Accessors

customName

customName:

Sets custom name using string or function Name will be sanitized

memberof

File

filename

filename:

Alias for name getter

readonly
type

{string}

memberof

File

mimetype

mimetype:

Alias for file type

readonly
type

{string}

memberof

File

name

name:

Returns file name Sets new file name and cleanup extra chars

memberof

File

memberof

File

size

size:

Returns file size

memberof

File

type

type:

Returns file type

default

'application/octet-stream'

memberof

File

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(): object