API Version: 6.5

IPCortex.Types.File

The File Class, used by chat add-on features

Properties

Name Type Description
label String Name of the file.
name String Senders name.
size Number Size of the file in bytes.
signalling Class Usually a Room - This contains a reference to the signalling layer used to set up the Av
progress Object Progress of the member by contact id.
file Blob Complete file, only available as the receiver and once complete.
state String File state.
  • timeout
  • error
  • unknown
  • offered
  • acknowledged
  • accepted
  • connecting
  • connected
  • rejected
  • closed
party String File party.
  • send
  • receive

Methods

file.accept()

Kind: class method of IPCortex.Types.File
Accept the file.

file.reject()

Kind: class method of IPCortex.Types.File
Reject or cancel the file transfer.

file.addListener(event, callback)

Kind: class method of IPCortex.Types.File
Add listener method, inherited from Api base class and common to all classes.
Parameter Type Description
event String Name of event, e.g. 'update'
callback Function Callback which is passed a reference to the updated Class object

file.removeListener(event, callback)

Kind: class method of IPCortex.Types.File
Remove listener method, inherited from Api base class and common to all classes. event and callback must be identical to those used in addListener() in order for the remove to succeed.
Parameter Type Description
event String Name of event, e.g. 'update'
callback Function Callback which is passed a reference to the updated Class object

Events

  • new - A new file object is created.
  • update - The file transfer state changes, such as more bytes received.