Home Reference Source
import {FileUploadManager} from '@quobis/sippojs'
public class | source

FileUploadManager

this class is experimental.

FileUploadManager objects allows creating and receiving file transfers They are obtained by calling the Session#createFileSharingManager method of a Session object

Member Summary

Public Members
public

emitter: EventEmitter

Method Summary

Public Methods
public

abort(fileUpload: FileUpload): Promise<void>

Aborts a currently in progress file upload

public

async create(file: File): Promise<string>

Starts uploading a new file

public

getFileUploads(): InmutableMap<string, FileUpload

Returns an immutable map with file uploads

public

remove(fileUpload: FileUpload)

Removes a file upload from the list

public

waitForEnd(id: *): *

Public Members

public emitter: EventEmitter source

Public Methods

public abort(fileUpload: FileUpload): Promise<void> source

Aborts a currently in progress file upload

Params:

NameTypeAttributeDescription
fileUpload FileUpload

Return:

Promise<void>

public async create(file: File): Promise<string> source

Starts uploading a new file

Params:

NameTypeAttributeDescription
file File

Local file

Return:

Promise<string>

id of the new file upload

public getFileUploads(): InmutableMap<string, FileUpload source

Returns an immutable map with file uploads

Return:

InmutableMap<string, FileUpload

public remove(fileUpload: FileUpload) source

Removes a file upload from the list

Params:

NameTypeAttributeDescription
fileUpload FileUpload

public waitForEnd(id: *): * source

Params:

NameTypeAttributeDescription
id *

Return:

*