--- title: "Upload Object" url: https://docs.catalyst.zoho.com/en/sdk/android/v2/cloud-scale/stratus/upload-object/ description: "This page lists the Android SDK methods to upload an object to the bucket." 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: "Upload Object Help Documentation" url: /en/cloud-scale/help/stratus/objects/upload-object/ - name: "Java SDK" url: /en/sdk/java/v1/cloud-scale/stratus/upload-object/ - name: "JavaScript SDK Documentation" url: /en/sdk/javascript/v1/cloudscale/stratus/upload-object/ - name: "Python SDK" url: /en/sdk/python/v1/cloud-scale/stratus/upload-object/ - name: "iOS SDK" url: /en/sdk/ios/v2/cloud-scale/stratus/upload-object/ - name: "Flutter SDK" url: /en/sdk/flutter/v2/cloud-scale/stratus/upload-object/ - name: "REST API" url: /en/api/code-reference/cloud-scale/stratus/upload-object/#UploadObject --- # Upload Object The SDK method listed in this section will allow you to [upload objects](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/objects/upload-object/) to the [bucket](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/buckets/name-bucket/) If you do not have [Versioning](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/stratus-config/general-settings/#versioning) enabled for your object, and if Stratus gets multiple write requests for the same object, the object will be continuously overwritten. The latest upload of the object will be the only object that is stored. However, with Versioning enabled, each upload will be considered a version of the object, and all of them will be stored in the bucket, each with a unique `versionId`. > **Note:** The following characters including space are not supported when you create a path or an object: double quote, both angular brackets, hashtag, backward slash and pipe symbol. ### Upload an Object Using File Path and Name This SDK can be used to upload an object to the bucket using its complete name and [path](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/objects/introduction/#path). **Parameters Used**
Parameter Name Data type Definition
`filePath` **String** A **mandatory** parameter. Will contain the complete path of the location from where the file needs to be uploaded from.
`fileName` **String**
  • An **mandatory** parameter. Will hold the complete name of the object.
  • **Default Value**: Will hold the value of the last path value that was used.
`shouldCompress` **Boolean**
  • An **optional** parameter. To allow you to choose if the object needs to be compressed or not.
  • **Default Value**: false.
`progress` **Function**
  • An **optional** parameter. This is a callback function while uploading a file.
```bash bucketIntance.uploadObject("/Desktop", "Helplinecard.jpeg", true, { println(" >> Object Upload Success -$it") }, { println(" >> Object Upload Failed -$it") }, progress = { bytesWritten, contentLength, percentage -> println("Percentage: $percentage") } ) ``` ### Upload an Object Using File Path This SDK can be used to upload an object to the bucket using its complete [path](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/objects/introduction/#path). **Parameters Used**
Parameter Name Data type Definition
`filePath` **String** A **mandatory** parameter. Will contain the complete path of the location from where the file needs to be uploaded from.
`shouldCompress` **Boolean**
  • An **optional** parameter. To allow you to choose if the object needs to be compressed or not.
  • **Default Value**: false.
`progress` **Function**
  • An **optional** parameter. This is a callback function while uploading a file.
```bash bucketIntance.uploadObject("/Desktop", "Helplinecard.jpeg", true, { println(" >> Object Upload Success -$it") }, { println(" >> Object Upload Failed -$it") }, progress = { bytesWritten, contentLength, percentage -> println("Percentage: $percentage") } ) ``` ### Upload an Object Using InputStream and File Name This SDK can be used to upload an object to the bucket using its file name and an input stream of the object to be uploaded. **Parameters Used**
Parameter Name Data type Definition
`stream` **InputStream** A **mandatory** parameter. Will contain the input stream of the object that needs to be uploaded.
`fileName` **String**
  • An **mandatory** parameter. Will hold the complete name of the object.
  • **Default Value**: Will hold the value of the last path value that was used.
`shouldCompress` **Boolean**
  • An **optional** parameter. To allow you to choose if the object needs to be compressed or not.
  • **Default Value**: false.
`progress` **Function**
  • An **optional** parameter. This is a callback function while uploading a file.
```bash val file = File("/Desktop/HelplineCard.jpg") val inputStream: InputStream = FileInputStream(file) bucketIntance.uploadObject(inputSrream, "Helplinecard.jpeg", true, { println(" >> Object Upload Success -$it") }, { println(" >> Object Upload Failed -$it") }, progress = { bytesWritten, contentLength, percentage -> println("Percentage: $percentage") } ) ```