Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • EventEmitter
    • Upload

Index

Constructors

constructor

Properties

Private MAX_PARTS

MAX_PARTS: number = 10000

S3 multipart upload does not allow more than 10000 parts.

Private abortController

abortController: AbortController

Private bytesUploadedSoFar

bytesUploadedSoFar: number

Private client

client: S3Client

Private concurrentUploaders

concurrentUploaders: Promise<void>[] = []

Private Optional createMultiPartPromise

createMultiPartPromise: Promise<CreateMultipartUploadCommandOutput>

Private isMultiPart

isMultiPart: boolean = true

Private leavePartsOnError

leavePartsOnError: boolean = false

Private params

params: PutObjectCommandInput

Private partSize

partSize: number = MIN_PART_SIZE

Private queueSize

queueSize: number = 4

Private Optional singleUploadResult

singleUploadResult: CompleteMultipartUploadCommandOutput

Private tags

tags: Tag[] = []

Private Optional totalBytes

totalBytes: number

Optional uploadEvent

uploadEvent: string

Private Optional uploadId

uploadId: string

Private uploadedParts

uploadedParts: CompletedPart[] = []

Static Readonly captureRejectionSymbol

captureRejectionSymbol: unique symbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Static Readonly errorMonitor

errorMonitor: unique symbol

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

Private __abortTimeout

  • __abortTimeout(abortSignal: AbortSignal): Promise<AbortMultipartUploadCommandOutput>

Private __createMultipartUpload

  • __createMultipartUpload(): Promise<void>

Private __doConcurrentUpload

  • __doConcurrentUpload(dataFeeder: AsyncGenerator<RawDataPart, void, undefined>): Promise<void>

Private __doMultipartUpload

  • __doMultipartUpload(): Promise<CompleteMultipartUploadCommandOutput>

Private __notifyProgress

  • __notifyProgress(progress: Progress): void

Private __uploadUsingPut

  • __uploadUsingPut(dataPart: RawDataPart): Promise<void>

Private __validateInput

  • __validateInput(): void

abort

  • abort(): Promise<void>

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

done

  • done(): Promise<CompleteMultipartUploadCommandOutput | AbortMultipartUploadCommandOutput>

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: "httpUploadProgress", listener: (progress: Progress) => void): this

once

  • once(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static on

  • on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>
  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

Static once

  • once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
  • once(emitter: DOMEventTarget, event: string): Promise<any[]>
  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>