R2
Local Uploads
Local uploads for an R2 bucket.
Local uploads for an R2 bucket.
Get
Get the local uploads configuration for a bucket.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
bucketName | string | Yes | Bucket Name. |
php
$response = $client->r2()->localUploads()->get('ACCOUNT_ID', 'BUCKET_NAME');
Update
Turn local uploads on or off for a bucket.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. | |
bucketName | string | Yes | Bucket Name. | |
enabled | bool | Yes | Whether to enable local uploads for this bucket. |
php
$response = $client->r2()->localUploads()->update('ACCOUNT_ID', 'BUCKET_NAME', true);

