---
title: "Download Object"
url: https://docs.catalyst.zoho.com/en/sdk/web/v4/cloud-scale/stratus/download-object/
description: "This page describes the web SDK method to retreive an object from Stratus."
last_updated: 2026-09-08T11:07:33Z
service: Cloud Scale
type: general
related_links:
- name: "Stratus Component Help Documentation"
url: /en/cloud-scale/help/stratus/introduction
- name: "Java SDK"
url: /en/sdk/java/v1/cloud-scale/stratus/download-object/
- name: "JavaScript SDK Documentation"
url: /en/sdk/javascript/v1/cloudscale/stratus/download-object/
- name: "Python SDK"
url: /en/sdk/python/v1/cloud-scale/stratus/download-object/
- name: "iOS SDK"
url: /en/sdk/ios/v2/cloud-scale/stratus/download-object/
- name: "Android SDK"
url: /en/sdk/android/v2/cloud-scale/stratus/download-object/
- name: "Flutter SDK"
url: /en/sdk/flutter/v2/cloud-scale/stratus/download-object/
- name: "REST API"
url: /en/api/code-reference/cloud-scale/stratus/get-all-buckets/#GetAllBuckets
---
# Download Object
> **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/stratus/download-object/) now.
This SDK method can be used to download an object from the bucket. The response will be in **blob** format. The Stratus reference used in the below code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/web/v4/cloud-scale/stratus/initialize-stratus-instance/).
Expected responses with respect to [Versioning](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/stratus-config/general-settings/#versioning) status of the bucket:
* If you do not pass the `versionId`, then you will get the **latest object**, along with the key you mention in the request.
* If Versioning was enabled for a bucket, then disabled. By default, the principal first object will be returned. To ensure you download the latest version of this object, you need to pass the `versionId` param with the value "`topVersion`".
* To retrieve a specific version, use the `versionId` query parameter with a valid version as a value.
**Parameters Used**
| Parameter Name |
Data Type |
Definition |
| `key` |
**String** |
Will hold the name of the object |
| `options` |
**JSON Object** |
- `versionId`: This is an optional **String** parameter. Will hold the unique `version ID` of the required object's version.
- `range`: This is an optional **String** parameter. The byte range of the required object. Will be used to get a specific part of the object.
- `cached`: This is an optional **Boolean** parameter.
- Will be used to get cached version of the object
- Will only accept two values: "`true`" or "`false`"
- `false` will be the value, if this param is not used
- `true` will be the value, if [Caching](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/stratus-config/general-settings/#caching) is enabled for your bucket and you pass this param. In this case, the object will be retrieved from the cached domain.
- `signed`: This is an optional **Boolean** parameter. The default value is "`false`". Will make an api call to get a signed url.
- `signedUrlFn`:
- This is an optional **Function** parameter.
- This is a Callback function that will return a **signedurl api respone** given in server SDK ([Java](https://docs.catalyst.zoho.com/en/sdk/java/v1/cloud-scale/stratus/pre-signed-urls/), [Node.js](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/stratus/pre-signed-urls/), and [Python](https://docs.catalyst.zoho.com/en/sdk/python/v1/cloud-scale/stratus/pre-signed-urls/)) to download a file.
- This function will only accept asynchronous functions and promises.
- When this function is used, Catalyst will pass the cached url and expiry time to it as parameters which can be used to generate a signed url.
|
| `processCallback` |
**Function** |
Callback function while downloading file |
### Download Object Using Object Name
The following SDK snippet will allow you to download an object from a bucket in Stratus using its `key`.
```javascript
const getObject = await bucket.getObject("key");
const getObjectStart = getObject.start(); // to start the request
const getObjectAbort = getObject.abort(); // to abort the request
```
### Download a Particular Version of the Object
The following SDK snippet will allow you to download a particular version of the object from a bucket in Stratus using its `key`, and `versionId`.
```javascript
const options = {
'versionId': 'djkshr8374yiuhf48', // download a specific version of an object
}
const getObject = await bucket.getObject("key", options);
const getObjectStart = getObject.start(); // to start the request
const getObjectAbort = getObject.abort(); // to abort the request
```
### Download Object With Process Callback
The following SDK snippet will allow you to download a particular object from a bucket in Stratus with process callback options. This SDK is best used when you wish to perform an additional function like logging, rendering load/buffer screens, etc. alongside the download operation.
```javascript
// process callback while an object is being downloaded
const processCallback = () => {
// Function to execute while the object is being fetched
console.log("Downloading Object");
}
const options = {
'versionId': 'djkshr8374yiuhf48'
}
const getObject = await bucket.getObject("key", options, processCallback);
const getObjectStart = getObject.start(); // to start the request
const getObjectAbort = getObject.abort(); // to abort the request
```
**Example Response**
```json
{
"status": 200,
"content": {Blob Data},
"message": "OK"
}
```
**Possible Exceptions**
* **404**: Object or Bucket Not Found
* **416**: Requested range not satisfiable
### Download a Particular Part of the Object
In this section, we are going to go over an SDK method that will allow you to successfully download a required byte range of the object from Stratus to your local system. The Stratus reference used in the below code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/web/v4/cloud-scale/stratus/initialize-stratus-instance/).
This method functions in a manner where the object is split into multiple byte ranges using the start and end bytes range of the object.
```javascript
const processCallback = () => {
// Function to execute while the object is being fetched
console.log("Downloading Object");
}
const options = {
'range': '0-2000' // start and end range of the object in bytes
}
const getObject = await stratus.getObject("key", options, processCallback);
const getObjectStart = getObject.start(); // to start the request
const getObjectAbort = getObject.abort(); // to abort the request
```
**Example Response**
```json
{
"status": 206,
"content": {Blob Data},
"message": "PARTIAL_CONTENT"
}
```
### Download Object Using a Signed URL
#### Using Asynchronous Functions
```javascript
// Download Object Using Signed Url
// Using Asynchronous Function
const processCallback = () => {
// Function to execute while the object is being fetched
console.log("Downloading Object");
}
const options = {
'range': '0-2000' // start and end range of the object in bytes,
'signed': true, // to declare we will be using signed url to getObject from bucket.
'signedUrlFn' : async (functionData) => {
console.log("Data : " + functionData);
// Function Logic
return {
"signed_url": "" //signed url
}
}
}
const getObject = await stratus.getObject("key", options, processCallback);
const getObjectStart = getObject.start(); // to start the request
const getObjectAbort = getObject.abort(); // to abort the request
```
#### Using Promises
```javascript
// Using Promises
const processCallback = () => {
// Function to execute while the object is being fetched
console.log("Downloading Object");
}
const options = {
'range': '0-2000' // start and end range of the object in bytes,
'signed': true, // to declare we will be using signed url to getObject from bucket.
'signedUrlFn' : (functionData) => {
return new Promise((resolve, reject) => {
console.log("Data : " + functionData);
// Function Logic
resolve({
"signed_url" : ""
})
})
}
}
const getObject = await stratus.getObject("key", options, processCallback);
const getObjectStart = getObject.start(); // to start the request
const getObjectAbort = getObject.abort(); // to abort the request
```
#### Using SignedURL with Options
The following SDK method will allow you download an object using a signed URL, and to set an **expiry time** for the signed URL.
```javascript
// Download Object Using Signed Url and Expiry Time
const processCallback = () => {
// Function to execute while the object is being fetched
console.log("Downloading Object");
}
const options = {
'range': '0-2000' // start and end range of the object in bytes,
'signed': true, // to declare we will be using signed url to getObject from bucket.
'signedUrlFn' : async (functionData) => {
console.log("Data : " + functionData);
// Function Logic
return {
"signed_url": "" // Signed Url
}
},
"expiryInSeconds" : 3000 // In Seconds
}
const getObject = await stratus.getObject("key", options, processCallback);
const getObjectStart = getObject.start(); // to start the request
const getObjectAbort = getObject.abort(); // to abort the request
```
### Download a Cached Object Using Cached URL
The following SDK method will allow you to download a cached object using the [Cached URL](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/stratus-config/general-settings/#caching).
```javascript
// Cached URL
const processCallback = () => {
// Function to execute while the object is being fetched
console.log("Downloading Object");
}
const options = {
'range': '0-2000' // start and end range of the object in bytes,
'cached': true, // to declare we will be using cached url to getObject from bucket.
}
const getObject = await stratus.getObject("key", options, processCallback);
const getObjectStart = getObject.start(); // to start the request
const getObjectAbort = getObject.abort(); // to abort the request
```