Upload an Object to a Bucket
An object can be data in any format. You can upload it directly from your local system using a directory structure customizable per your requirement.
To upload an object or a group of objects:
-
Click the Upload button and choose Upload Folder if you wish to upload an entire folder with all of its objects, or Upload File if you wish to upload a select group of objects or just one object.
-
If you choose to upload:
Select the required folder from your local system and click Upload.

The folder will be uploaded with all its contents.

Click the uploaded directory to confirm it contains all the objects it contained in the local system.

Select the file, or files from your local system to upload, and click Open.

The files will be uploaded.

Upload Object Using Path
You can also upload objects to the bucket using the Create Path option.

-
Click the Create Path button.
-
Provide your required path using the your required path using the forward slash ‘/’ special character as the directory separator.
-
Click the upload-icon and select the required object in your local system and click Open to upload.
The entered path will be created and can be navigated in a manner you would a conventional directory.

The following SDK method enables you to upload an object to the bucket:
Ensure the following packages are imported:
copy
import com.zc.component.stratus.beans.ZCPutObjectOptions; import java.nio.file.Path; import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.io.*;
copy
InputStream file =new FileInputStream(“filePath”); Boolean res = bucket.putObject(“objectName”, file); System.out.println(res);
copy
// create a read stream for upload the object const file = fs.createReadStream(“file_path”); // call the upload method const res = await bucket.putObject(“object_name”, file); console.log(res);
copy
file = open(‘file_path’,‘rb’) res = bucket.put_object(‘object_name’,file) print(res)
copy
const putObject = stratus.putObject("{object_name}","{File}", “{options}”, “{processCallback}”); const putObjectStart = putObject.start(); // to start the request const putObjectAbort = putObject.abort(); // to abort the request
copy
bucketInstance.upload( filePath : “{file_path}”, fileName : “{file_name}”, shouldCompress : true ) { error in if let error = error { print(“Error : ( error )”) return } print(“Uploaded Successfully”) }
copy
bucketIntance.uploadObject("/Desktop", “Helplinecard.jpeg”, true, { println(" » Object Upload Success -$it") }, { println(" » Object Upload Failed -$it") }, progress = { bytesWritten, contentLength, percentage -> println(“Percentage: $percentage”) } )
copy
try{ XFile? imageFile = await pickImage(ImageSource.gallery); var bucket = stratus.bucket(“testing”); var response = await bucket.uploadObject(imageFile!.path); print(“Upload Status: ${response.statusCode}”); } on ZCatalystException catch (ex) { print(ex.toString()); }
Last Updated 2025-06-03 18:19:55 +0530 +0530
Yes
No
Send your feedback to us