د S3 Channel اضافه کول
کله مناسب دی
S3 channel هغه وخت وکاروئ چې:
- غواړئ هر S3-compatible object storage service وصل کړئ، لکه Cloudflare R2، Backblaze B2، MinIO، AWS S3 یا بل compatible provider.
- د standard S3 configuration model غوره کوئ:
Endpoint، Access Key او Secret Key. - نه غواړئ native Cloudflare R2 binding channel وکاروئ، یا ستاسې storage provider Cloudflare R2 نه وي.
د پیل مخکې اړتیاوې
| اړتیا | موخه |
|---|---|
| S3 Endpoint | د object storage service S3 API endpoint. |
| Bucket name | هغه bucket چې files پکې ساتل کېږي. |
| Region | storage region. د Cloudflare R2 لپاره عموماً auto. |
| Access Key ID | S3 access key ID. |
| Secret Access Key | S3 secret access key. |
| CDN domain | د file access لپاره optional custom domain. |
د Cloudflare R2 لپاره د S3 API له لارې مثال:
text
Endpoint: https://your-account-id.r2.cloudflarestorage.com
Bucket: your-r2-bucket-name
Region: auto
Access Key ID: copied from the Cloudflare R2 API token
Secret Access Key: copied from the Cloudflare R2 API tokenچېرته یې اضافه کړو
- System Settings پرانیزئ.
- Upload Settings ته ولاړ شئ.
- په پورته ښي لوري کې Add Channel کلیک کړئ.
S3وټاکئ.
Field Reference
| Field | څه کوي | Required |
|---|---|---|
| Channel name | د دې S3 channel لپاره پېژندل کېدونکی نوم، لکه s3test یا R2-S3. | Yes |
| Enable channel | کنټرولوي چې دا channel په upload selection کې ګډون وکړي که نه. | Recommended |
| Endpoint | بشپړ S3 service endpoint د https:// سره. | Yes |
| Custom CDN domain | اختیاري. که set شي، generated file links به دا domain غوره کړي. | No |
| Bucket name | bucket name، لکه s3test یا img-r2. | Yes |
| Bucket region | Region. د Cloudflare R2 لپاره عموماً auto. | Yes |
| Access Key ID | S3 access key ID. | Yes |
| Secret Access Key | S3 secret access key. | Yes |
| Path-style access | compatibility switch. default off دی. ځینې MinIO، OpenList یا self-hosted S3 services یې غواړي. | No |
| Quota limit | کنټرولوي چې دا S3 channel د capacity له مخې upload selection کې ګډون وکړي که نه. | No |
| Capacity limit | د quota limit له enable وروسته required، لکه 10 GB. | Required when quota limit is enabled |
| Threshold | کله چې usage دې percentage ته ورسېږي write بندوي، لکه 90%. | Required when quota limit is enabled |
| Remark | د خپل maintenance لپاره یادښتونه. | No |
Cloudflare R2 S3 API Keys جوړ کړئ
- Cloudflare Dashboard پرانیزئ.
R2 Object Storageته ولاړ شئ.Manage R2 API Tokensیا API token management entry ومومئ.

- داسې R2 API token جوړ کړئ چې target bucket ته access ولري.

- generated
Access Key IDاوSecret Access Keycopy کړئ.

- R2 bucket page ته بېرته ولاړ شئ او bucket name confirm کړئ.
- د account لپاره S3 API endpoint ولیکئ. عموماً داسې ښکاري:
text
https://your-account-id.r2.cloudflarestorage.comSetup Steps
- Upload Settings پرانیزئ.
- Add Channel کلیک کړئ.
S3وټاکئ.- یو پېژندل کېدونکی channel name ولیکئ، لکه
s3test. - S3 API endpoint په
Endpointکې ولیکئ. - که custom CDN لرئ، په
Custom CDN domainکې یې ولیکئ؛ که نه، خالي یې پرېږدئ. - bucket name ولیکئ.
- region ولیکئ. د Cloudflare R2 مثال لپاره
autoوکاروئ. - Access Key ID او Secret Access Key ولیکئ.
- path-style access off پرېږدئ، مګر provider یې صریحاً وغواړي.
- که capacity control غواړئ، quota limit enable کړئ او capacity limit او threshold ولیکئ.
- Save کلیک کړئ.

څنګه یې Verify کړو
| Check | د verify طریقه |
|---|---|
| Channel card appears | له Save وروسته Upload Settings باید S3 channel card وښيي. |
| Channel is enabled | د card په پورته ښي لوري کې switch باید on پاتې شي. |
| Key fields are saved | detail view باید Endpoint، Bucket، Region، path-style access او اړوند fields وښيي. |
| Upload works | test image upload کړئ او confirm کړئ چې object په target bucket کې جوړ شوی. |
| Link opens | له upload وروسته returned image link باید عادي پرانستل شي. |
| Capacity display works | که quota limit enabled وي، card باید used capacity او configured limit وښيي. |
S3 capacity statistics د provider bucket real time query نه کوي، بلکې د ImgBed local file records څخه حسابېږي. د S3 configuration له save وروسته system د current D1 records څخه quota ledger بیا محاسبه کوي.

FAQ
path-style access enable کړم؟
عموماً نه.
یوازې هغه وخت یې enable کړئ چې S3-compatible provider مو virtual-hosted-style URLs نه support کوي، یا provider documentation صریحاً path-style access غواړي.
CDN domain د څه لپاره دی؟
که د bucket مخې ته CDN یا custom access domain لرئ، دلته یې ولیکئ.
له configure وروسته generated file links به دا domain غوره کړي. که CDN نه کاروئ، field خالي پرېږدئ.
ولې upload fail کېږي؟
لومړی دا وګورئ:
- Endpoint د
https://سره بشپړ URL لري. - bucket name سم دی.
- Region د provider requirement سره برابر دی.
- Access Key ID او Secret Access Key بشپړ copy شوي.
- key د target bucket لپاره write permission لري.
- provider path-style access نه غواړي، یا که غواړي enabled دی.
Quick Checklist
text
S3 Endpoint, Bucket, Region, Access Key او Secret Key چمتو کړئ
-> Upload Settings پرانیزئ
-> Add Channel
-> S3 وټاکئ
-> Endpoint / Bucket / Region / Access Key / Secret Key ولیکئ
-> که اړتیا وي CDN domain ولیکئ
-> path-style access default off پرېږدئ
-> که اړتیا وي quota limit enable کړئ
-> Save
-> test image upload او result وګورئ