Constructors

Properties

deferredUpload?: Deferred<FileUploadResult>
fileService: FileService
fileSystemPreferences: FileSystemPreferences
messageService: MessageService
onDidUploadEmitter: Emitter<string[]> = ...
uploadForm: Form
TARGET: string = 'target'
UPLOAD: string = 'upload'

Accessors

Methods

  • Utility function to attach events and get a callback to unregister those.

    You may not call unregister in the same tick as register is invoked.

    Parameters

    • target: EventTarget
    • register: ((unregister) => Record<string, EventListenerOrEventListenerObject>)
        • (unregister): Record<string, EventListenerOrEventListenerObject>
        • Parameters

          • unregister: (() => void)
              • (): void
              • Returns void

          Returns Record<string, EventListenerOrEventListenerObject>

    Returns void

  • Parameters

    • file: File
    • targetUri: URI
    • token: CancellationToken
    • leaveInTemp: undefined | boolean
    • onProgress: ((total, done) => void)
        • (total, done): void
        • Parameters

          • total: number
          • done: number

          Returns void

    Returns {
        response: Promise<void>;
        upload: Promise<void>;
    }

    • response: Promise<void>

      Promise that resolves after the uploading step, once the server answers back.

      Rejects on network error. Rejects if status is not OK (200). Rejects if cancelled.

    • upload: Promise<void>

      Promise that resolves once the uploading is finished.

      Rejects on network error. Rejects if status is not OK (200). Rejects if cancelled.