JSDoc: Namespace: httpUpload

# Namespace: httpUpload

## jsxc.xmpp.httpUpload

Implements Http File Upload (XEP-0363)

Source:
  - jsxc.lib.xmpp.httpUpload.js, line 1
See:
  - http://xmpp.org/extensions/xep-0363.html

### Methods

#### (static) discoverUploadService()

Discover upload service for http upload.

Source:
  - jsxc.lib.xmpp.httpUpload.js, line 78

#### (static) failedRequestSlotCB(stanza, cb)

Process failed response to slot request.

##### Parameters:

Name | Type | Description
--- | --- | ---
`stanza` | String |
`cb` | function |

Source:
  - jsxc.lib.xmpp.httpUpload.js, line 307

#### (static) init(o)

Set up http file upload.

##### Parameters:

Name | Type | Description
--- | --- | ---
`o` | Object | options

Source:
  - jsxc.lib.xmpp.httpUpload.js, line 25

#### (static) queryItemForUploadService(jid, cb)

Query item for upload service.

##### Parameters:

Name | Type | Description
--- | --- | ---
`jid` | String |
`cb` | function | Callback on success

Source:
  - jsxc.lib.xmpp.httpUpload.js, line 109

#### (static) requestSlot(file, cb)

Request upload slot.

##### Parameters:

Name | Type | Description
--- | --- | ---
`file` | File |
`cb` | function | Callback after finished request

Source:
  - jsxc.lib.xmpp.httpUpload.js, line 250

#### (static) sendFile(file, message)

Upload file and send link to peer.

##### Parameters:

Name | Type | Description
--- | --- | ---
`file` | File |
`message` | Message | Preview message

Source:
  - jsxc.lib.xmpp.httpUpload.js, line 143

#### (static) successfulRequestSlotCB(stanza, cb)

Process successful response to slot request.

##### Parameters:

Name | Type | Description
--- | --- | ---
`stanza` | String |
`cb` | function |

Source:
  - jsxc.lib.xmpp.httpUpload.js, line 283

#### (static) uploadFile(url, file, message, success_cb)

Upload the given file to the given url.

##### Parameters:

Name | Type | Description
--- | --- | ---
`url` | String | upload url
`file` | File |
`message` | Message | preview message
`success_cb` | function | callback on successful transition

Source:
  - jsxc.lib.xmpp.httpUpload.js, line 206