Upload full object
Upload object with single request
Function UploadFullObject(Val Name, Val Bucket, Val Entity, Val BasicData, Val Headers = Undefined, Val Directory = False) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Name | --name | String | ✔ | Name of the object in the bucket |
| Bucket | --bucket | String | ✔ | Name of the bucket to put the object |
| Entity | --data | String, BinaryData | ✔ | File path or binary data of the object |
| BasicData | --basic | Structure Of KeyAndValue | ✔ | Basic request data. See GetBasicDataStructure |
| Headers | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
| Directory | --dir | Boolean | ✖ | True > Path style URL, False > Virtual hosted style URL |
Returns: Structure Of KeyAndValue - serialized JSON response from storage
tip
Method at AWS documentation: PutObject
This is a service method. A PutObject method is intended for the common scenario of files uploading
Using this method for large files may cause errors
Parameters with Binary data type can also accept file paths on disk and URLs
1C:Enterprise/OneScript code example
URL = "storage-155.s3hoster.by";
AccessKey = "BRN5RKJE67...";
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
Region = "BTC";
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
Name = "pictureSmall.jpg";
Entity = "https://hut.openintegrations.dev/test_data/picture.jpg"; // URL, Path or Binary Data
Directory = True; // Formation URL in path-style
Bucket = "opi-dirbucket4";
Result = OPI_S3.UploadFullObject(Name, Bucket, Entity, BasicData, , Directory);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint s3 UploadFullObject \
--name "pictureSmall.jpg" \
--bucket "opi-dirbucket4" \
--data "https://hut.openintegrations.dev/test_data/picture.jpg" \
--basic "{'URL':'storage-155.s3hoster.by','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3'}" \
--dir true
:: JSON data can also be passed as a path to a .json file
oint s3 UploadFullObject ^
--name "pictureSmall.jpg" ^
--bucket "opi-dirbucket4" ^
--data "https://hut.openintegrations.dev/test_data/picture.jpg" ^
--basic "{'URL':'storage-155.s3hoster.by','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3'}" ^
--dir true
Result
{
"status": 200,
"response": {},
"headers": {
"Accept-Ranges": "bytes",
"Date": "Fri, 31 Oct 2025 12:15:30 GMT",
"ETag": "\"9e0176f87f6565a22f78e0f9b39a4d78\"",
"Server": "MinIO",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Vary": "Origin, Accept-Encoding",
"X-Amz-Id-2": "0757065d17b69556603743b9ea63f04bc7b9f349245bbff6b0ba901258e9c169",
"X-Amz-Request-Id": "18739276BF7A369A",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Content-Length": "0",
"Content-Type": "text/plain; charset=utf-8"
}
}