Put object
Uploads the file to the bucket
Function PutObject(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 (default): PutObject
Method at AWS documentation (multipart): Multipart upload
You can use the ChunkSize field in the basic data to specify the minimum file and chunk size for a chunked upload. For example, ChunkSize=X means that all files larger than X (in bytes) will be downloaded in chunks, where one chunk will be of size X. Chunk upload is used for large files. Default ChunkSize - 20971520 bytes (20 MB)
Parameters with Binary data type can also accept file paths on disk and URLs
1C:Enterprise/OneScript code example
URL = "s3.openintegrations.dev";
AccessKey = "bayselo...";
SecretKey = "12we34...";
Region = "BTC";
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
Directory = True; // Formation URL in path-style
Bucket = "w567hjy1";
Name = "picture.jpg";
Entity = "https://hut.openintegrations.dev/test_data/picture.jpg"; // URL, Path or Binary Data
Result = OPI_S3.PutObject(Name, Bucket, Entity, BasicData, , Directory);
Name = "fileChunked.mp3";
Entity = "https://hut.openintegrations.dev/test_data/song.mp3"; // URL, Path or Binary Data
BasicData.Insert("ChunkSize", 5242880); // Size parts for upload in multiple of requests
Result = OPI_S3.PutObject(Name, Bucket, Entity, BasicData, , Directory);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint s3 PutObject \
--name "fileChunked.mp3" \
--bucket "b1a7b6e9" \
--data "https://hut.openintegrations.dev/test_data/song.mp3" \
--basic "{'URL':'s3.openintegrations.dev','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3','ChunkSize':'5242880'}" \
--dir true
:: JSON data can also be passed as a path to a .json file
oint s3 PutObject ^
--name "fileChunked.mp3" ^
--bucket "b1a7b6e9" ^
--data "https://hut.openintegrations.dev/test_data/song.mp3" ^
--basic "{'URL':'s3.openintegrations.dev','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3','ChunkSize':'5242880'}" ^
--dir true
Result
{
"status": 200,
"response": {},
"headers": {
"Accept-Ranges": "bytes",
"ETag": "\"9e0176f87f6565a22f78e0f9b39a4d78\"",
"Vary": "Accept-Encoding",
"Server": "Microsoft-IIS/10.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Amz-Id-2": "dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8",
"X-Amz-Request-Id": "18A00B818E45FD28",
"X-Content-Type-Options": "nosniff",
"X-Ratelimit-Limit": "6432",
"X-Ratelimit-Remaining": "6432",
"X-XSS-Protection": "1; mode=block",
"X-Powered-By": "ARR/3.0",
"Date": "Wed, 25 Mar 2026 09:28:23 GMT",
"Content-Length": "0"
}
}