Client configuration struct.
Required Fields
| Field | Type | Description |
|---|
| provider | :aws | :qiniu | :aliyun | :custom | Storage provider |
| access_key_id | String.t() | Access key |
| secret_access_key | String.t() | Secret key |
Optional Fields
| Field | Type | Default | Description |
|---|---|---|---|
region | String.t() | "us-east-1" | Storage region |
endpoint | String.t() | auto | Custom endpoint URL |
security_token | String.t() | nil | Optional STS session token |
| endpoint_mode | :service | :bucket | :service | OSS endpoint host interpretation |
| bucket | String.t() | nil | Default bucket |
| scheme | String.t() | "https://" | URL scheme |
| port | integer() | 443 | Port number |
| bucket_addressing | :virtual | :path | :virtual | Bucket addressing style |
| cdn_upload | boolean() | true | Use CDN for uploads |
| cdn_download | boolean() | true | Use CDN for downloads |
| cdn | CDN.t() | nil | CDN configuration |
Region Values
AWS S3: "us-east-1", "us-west-2", "eu-west-1", "ap-northeast-1", etc.
Qiniu (S3): "cn-east-1", "cn-north-1", "cn-south-1", etc.
Aliyun OSS: Explicit region required, e.g. "cn-hangzhou" or "cn-shanghai".
Custom: Any S3-compatible service (MinIO, DigitalOcean Spaces, Cloudflare R2, etc.)
Summary
Types
@type t() :: %ExOss.Client.Client{ access_key_id: String.t(), bucket: String.t() | nil, bucket_addressing: :path | :virtual, cdn: ExOss.Client.CDN.t() | nil, cdn_download: boolean(), cdn_upload: boolean(), endpoint: String.t() | nil, endpoint_mode: :service | :bucket, port: non_neg_integer(), provider: :aws | :qiniu | :aliyun | :custom, region: String.t() | nil, scheme: String.t(), secret_access_key: String.t(), security_token: String.t() | nil }