Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpServerFileUpload

Represents an file upload from an HTML FORM.

Hierarchy

  • HttpServerFileUpload

Implements

Index

Methods

cancelStreamToFileSystem

  • cancelStreamToFileSystem(): boolean
  • Try to cancel the file system streaming, the streamed file will be deleted.

    Returns boolean

charset

  • charset(): string
  • Returns string

contentTransferEncoding

  • contentTransferEncoding(): string
  • Returns string

contentType

  • contentType(): string
  • Returns string

endHandler

  • Parameters

    • endHandler: ((res: void) => void) | Handler<void> | null | undefined

    Returns HttpServerFileUpload

exceptionHandler

fetch

file

  • Returns AsyncFile

filename

  • filename(): string
  • Returns string

handler

isSizeAvailable

  • isSizeAvailable(): boolean
  • Returns boolean

name

  • name(): string
  • Returns string

pause

pipe

  • Pause this stream and return a to transfer the elements of this stream to a destination .

    The stream will be resumed when the pipe will be wired to a WriteStream.

    Returns Pipe<Buffer>

pipeTo

  • Pipe this ReadStream to the WriteStream.

    Elements emitted by this stream will be written to the write stream until this stream ends or fails.

    Once this stream has ended or failed, the write stream will be ended and the handler will be called with the result.

    Parameters

    Returns PromiseLike<void>

  • Pipe this ReadStream to the WriteStream.

    Elements emitted by this stream will be written to the write stream until this stream ends or fails.

    Once this stream has ended or failed, the write stream will be ended and the handler will be called with the result.

    Parameters

    Returns void

resume

size

  • size(): number
  • The size of the upload may not be available until it is all read. Check {@link HttpServerFileUpload#isSizeAvailable} to determine this

    Returns number

streamToFileSystem

  • streamToFileSystem(filename: string): PromiseLike<void>
  • streamToFileSystem(filename: string, handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Stream the content of this upload to the given file on storage.

    Parameters

    • filename: string

    Returns PromiseLike<void>

  • Stream the content of this upload to the given file on storage.

    Parameters

    Returns void

Generated using TypeDoc