You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `items` - (required) an array of objects to download. Each item has:
542
+
- `key`- (required) the name of the S3 object.
543
+
- `filePath`- (optional) if provided, the object is streamed directly to this local file path instead of being returned in the response body.
544
+
- `concurrency`- (optional) the maximum number of concurrent downloads. Defaults to `10`. Must be greater than `0`.
545
+
546
+
The component-level `encodeBase64` metadata option applies to bulk get. When set to `"true"`, object contents are base64-encoded before being returned in the response body. When `filePath` is specified, the file will contain base64-encoded text rather than raw bytes.
The response body contains a JSON array with a result for each requested item. Each result includes a per-item error field for partial failure semantics — the operation succeeds overall, and individual failures are reported per key:
570
+
571
+
```json
572
+
[
573
+
{ "key": "file1.txt", "data": "contents of file1" },
574
+
{ "key": "file2.txt", "data": "contents of file2" },
575
+
{ "key": "missing.txt", "error": "object not found" }
576
+
]
577
+
```
578
+
579
+
When `filePath` is specified for an item, the `data` field is omitted and the content is written to the specified file.
580
+
581
+
### Bulk create objects
582
+
583
+
To upload multiple objects in parallel, invoke the AWS S3 binding with a `POST` method and the following JSON body:
- `items` - (required) an array of objects to upload. Each item has:
602
+
- `key`- (required) the name for the S3 object.
603
+
- `data`- the content to upload. Either `data` or `filePath` must be provided.
604
+
- `filePath`- a local file path to upload from. Either `data` or `filePath` must be provided.
605
+
- `contentType`- (optional) the MIME type of the object.
606
+
- `concurrency`- (optional) the maximum number of concurrent uploads. Defaults to `10`. Must be greater than `0`.
607
+
608
+
The component-level `decodeBase64` metadata option applies to bulk create. When set to `"true"`, the input is decoded from base64 before uploading to S3. This applies to both inline `data` fields and content read from `filePath` — use `filePath` with `decodeBase64` only when the file itself contains base64-encoded content.
{ "key": "bad-file.txt", "error": "either data or filePath is required" }
638
+
]
639
+
```
640
+
641
+
### Bulk delete objects
642
+
643
+
To delete multiple objects in a single batch operation, invoke the AWS S3 binding with a `POST` method and the following JSON body:
644
+
645
+
```json
646
+
{
647
+
"operation": "bulkDelete",
648
+
"data": {
649
+
"keys": ["file1.txt", "file2.txt", "file3.txt"]
650
+
}
651
+
}
652
+
```
653
+
654
+
The data parameters are:
655
+
656
+
- `keys`- (required) an array of object key names to delete. Must contain at least one key.
657
+
658
+
Bulk delete uses the S3 [DeleteObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html) batch API. If more than 1,000 keys are provided, the request is automatically split into batches of 1,000.
0 commit comments