Skip to main content
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. Visit Key Concepts page to learn the most important QuickBlox concepts.

Before you begin

  1. Register a QuickBlox account. This is a matter of a few minutes and you will be able to use this account to build your apps.
  2. Configure QuickBlox SDK for your app. Check out Setup page for more details.
  3. Create a user session to be able to use QuickBlox functionality. See Authentication page to learn how to do it.

Retrieve files

To retrieve the list of own files, you can use code below.

Upload file

You can upload a file to the cloud storage using the following code snippet.
ArgumentRequiredDescription
fileyesFile in the local storage.
publicAccessyesFile visibility. If the file is public then it’s possible to download it without a session token.
tagsyesComma-separated string with tags.
progressCallbacknoCallback to receive upload progress.
The maximum size of the uploaded file depends on the membership plan.
BasicStartupGrowthHIPAAEnterprise
File size limit10 Mb25 Mb50Mb50MbContact our sales team

Update file

It’s also possible to update the file’s data without creating a new content record.

Download file by UID

If the file is public then it’s possible to download it without a session token.

Get file info

Get information about a file by ID using the getFile() method. This method allows to load the file description model from the server, not the content of the file itself.
ArgumentRequiredDescription
fileIDyesID of the file.

Get file URL

Except for downloading, you can also get the URL of each QBFile. There are two types of file URLs that can be obtained: private and public.
  • Public URL allows anyone to access the file, no authorization token is needed.
  • Private URL can be accessed only by QuickBlox user with a session token.

Get public URL

To receive a public URL, use the code snippet below.
ArgumentRequiredDescription
fileUIDyesFile unique identifier. You can take the fileUid from the file using the getFile() method.

Get private URL

To get a private URL of the uploaded file, use the following code snippet.
ArgumentRequiredDescription
fileUidyesFile unique identifier. You can take the fileUid from the file using the getFile() method.

Delete file

Delete a file by file ID using the deleteFile() method below.
ArgumentRequiredDescription
fileIDyesID of the file.