Skip to content

د 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 پکې ساتل کېږي.
Regionstorage region. د Cloudflare R2 لپاره عموماً auto.
Access Key IDS3 access key ID.
Secret Access KeyS3 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

چېرته یې اضافه کړو

  1. System Settings پرانیزئ.
  2. Upload Settings ته ولاړ شئ.
  3. په پورته ښي لوري کې Add Channel کلیک کړئ.
  4. 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 namebucket name، لکه s3test یا img-r2.Yes
Bucket regionRegion. د Cloudflare R2 لپاره عموماً auto.Yes
Access Key IDS3 access key ID.Yes
Secret Access KeyS3 secret access key.Yes
Path-style accesscompatibility 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 جوړ کړئ

  1. Cloudflare Dashboard پرانیزئ.
  2. R2 Object Storage ته ولاړ شئ.
  3. Manage R2 API Tokens یا API token management entry ومومئ.

![R2 API token entry](../../image/upload/s3/r2 api token入口.png)

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

Create an account API token

  1. generated Access Key ID او Secret Access Key copy کړئ.

Copy the token values

  1. R2 bucket page ته بېرته ولاړ شئ او bucket name confirm کړئ.
  2. د account لپاره S3 API endpoint ولیکئ. عموماً داسې ښکاري:
text
https://your-account-id.r2.cloudflarestorage.com

Setup Steps

  1. Upload Settings پرانیزئ.
  2. Add Channel کلیک کړئ.
  3. S3 وټاکئ.
  4. یو پېژندل کېدونکی channel name ولیکئ، لکه s3test.
  5. S3 API endpoint په Endpoint کې ولیکئ.
  6. که custom CDN لرئ، په Custom CDN domain کې یې ولیکئ؛ که نه، خالي یې پرېږدئ.
  7. bucket name ولیکئ.
  8. region ولیکئ. د Cloudflare R2 مثال لپاره auto وکاروئ.
  9. Access Key ID او Secret Access Key ولیکئ.
  10. path-style access off پرېږدئ، مګر provider یې صریحاً وغواړي.
  11. که capacity control غواړئ، quota limit enable کړئ او capacity limit او threshold ولیکئ.
  12. Save کلیک کړئ.

Add S3 configuration

څنګه یې Verify کړو

Checkد verify طریقه
Channel card appearsله Save وروسته Upload Settings باید S3 channel card وښيي.
Channel is enabledد card په پورته ښي لوري کې switch باید on پاتې شي.
Key fields are saveddetail view باید Endpoint، Bucket، Region، path-style access او اړوند fields وښيي.
Upload workstest 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 بیا محاسبه کوي.

Quota query succeeded

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 کېږي؟

لومړی دا وګورئ:

  1. Endpoint د https:// سره بشپړ URL لري.
  2. bucket name سم دی.
  3. Region د provider requirement سره برابر دی.
  4. Access Key ID او Secret Access Key بشپړ copy شوي.
  5. key د target bucket لپاره write permission لري.
  6. 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 وګورئ

Released as user documentation for CloudFlare ImgBed.