Upload Object
The SDK method listed in this section will allow you to upload objects to the bucket
If you do not have 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.
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 |
|
copytry { 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-07-02 15:43:56 +0530 +0530
Yes
No
Send your feedback to us
Skip
Submit