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
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. |
Methods
file.accept()
Accept the file.
file.reject()
Reject or cancel the file transfer.
file.addListener(event, callback)
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)
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.