The QuickBlox Developer Hub

Welcome to the QuickBlox developer hub. You'll find comprehensive guides and documentation to help you start working with QuickBlox as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

This is our new documentation for beta version of QuickBlox React Native SDK. Please contact our Customer Support Team to provide your feedback, suggestions, and requests to improve this page.

The content module allows storing rich chat attachments, app content, and settings without having to republish them. Using a web interface you or your clients can control and make instant changes to the apps.

Upload file

Upload a file to the cloud using the following code snippet:

const url = 'path to file in local filesystem'
  .upload({ url, public: false })
  .then(function (file) { /* file uploaded successfully */ })
  .catch(function (e) { /* handle error */ })

Get file URL

There are two types of file URLs that can be obtained: private and public. Public URL allows anyone to access file, no QB authorization token is needed.

Get public URL

To receive a public URL, use the code snippet below:

  .getPublicUrl({ uid: 'file uid' })
  .then(function (url) { /* handle as necessary */ })
  .catch(function (e) { /* handle error */ })

Get private URL

To get a private URL of the uploaded file, use the following code snippet.

  .getPrivateURL({ uid: 'file uid' })
  .then(function (url) { /* handle as necessary */ })
  .catch(function (e) { /* handle error */ })

Update upload status

Subscribe to content module events to update file upload status.

export function* uploadFile(action = {}) {
  const { url } = action.payload
  try {
      yield call(QB.content.subscribeUploadProgress, { url })
      const file = yield call(QB.content.upload, { url, public: false })
      yield put(fileUploadSucess(file))
  } catch (e) {
      yield put(fileUploadFail(e.message))
  } finally {
      yield call(QB.content.unsubscribeUploadProgress, { url })

Updated 8 days ago


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.