Before you begin
- 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.
- Configure QuickBlox SDK for your app. Check out Setup page for more details.
- 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.- Java
- Kotlin
Upload file
You can upload a file to the cloud storage using the following code snippet.- Java
- Kotlin
The maximum size of the uploaded file depends on the membership plan.
Update file
It’s also possible to update the file’s data without creating a new content record.- Java
- Kotlin
Download file by UID
If the file is public then it’s possible to download it without a session token.- Java
- Kotlin
Get file info
Get information about a file by ID using thegetFile() method. This method allows to load the file description model from the server, not the content of the file itself.
- Java
- Kotlin
Get file URL
Except for downloading, you can also get the URL of eachQBFile. 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.- Java
- Kotlin
Get private URL
To get a private URL of the uploaded file, use the following code snippet.- Java
- Kotlin
Delete file
Delete a file by file ID using thedeleteFile() method below.
- Java
- Kotlin