Skip to content

S3 Channel ထည့်သွင်းခြင်း

ဘယ်အချိန်မှာ သုံးသင့်လဲ

S3 channel ကို ဒီအခြေအနေတွေမှာသုံးပါ:

  • Cloudflare R2, Backblaze B2, MinIO, AWS S3 သို့မဟုတ် S3-compatible object storage service တစ်ခုခုကို connect လုပ်ချင်လျှင်။
  • standard S3 configuration model ဖြစ်တဲ့ Endpoint, Access Key, Secret Key ကိုသုံးချင်လျှင်။
  • native Cloudflare R2 binding channel မသုံးချင်လျှင်၊ သို့မဟုတ် storage provider က Cloudflare R2 မဟုတ်လျှင်။

စမလုပ်ခင် လိုအပ်တာတွေ

လိုအပ်ချက်အသုံးပြုပုံ
S3 Endpointobject storage service ရဲ့ S3 API endpoint။
Bucket namefiles တွေသိမ်းမယ့် bucket။
Regionstorage region။ Cloudflare R2 အတွက် များသောအားဖြင့် auto
Access Key IDS3 access key ID။
Secret Access KeyS3 secret access key။
CDN domainfile 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-S3Yes
Enable channelဒီ channel က upload selection ထဲပါမပါထိန်းချုပ်သည်။Recommended
Endpointhttps:// ပါတဲ့ S3 service endpoint အပြည့်အစုံ။Yes
Custom CDN domainOptional။ set လုပ်ထားရင် generated file links က ဒီ domain ကိုဦးစားပေးသုံးသည်။No
Bucket namebucket name၊ ဥပမာ s3test သို့မဟုတ် img-r2Yes
Bucket regionRegion။ Cloudflare R2 အတွက် များသောအားဖြင့် autoYes
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 limitcapacity အပေါ်မူတည်ပြီး ဒီ S3 channel က upload selection ထဲပါမပါထိန်းချုပ်သည်။No
Capacity limitquota limit enabled ပြီးနောက်လိုအပ်သည်၊ ဥပမာ 10 GBRequired when quota limit is enabled
Thresholdusage က ဒီ percentage ရောက်ရင် write ရပ်သည်၊ ဥပမာ 90%Required when quota limit is enabled
Remarkကိုယ်တိုင် maintenance အတွက် notes။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. target bucket ကို access လုပ်နိုင်တဲ့ R2 API token ဖန်တီးပါ။

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. Endpoint ထဲမှာ S3 API endpoint ထည့်ပါ။
  6. custom CDN သုံးလျှင် Custom CDN domain ထဲထည့်ပါ၊ မသုံးလျှင်ဗလာထားပါ။
  7. bucket name ထည့်ပါ။
  8. region ထည့်ပါ။ Cloudflare R2 ဥပမာအတွက် auto သုံးပါ။
  9. Access Key ID နဲ့ Secret Access Key ထည့်ပါ။
  10. provider ကတိတိကျကျမလိုအပ်ဘဲ path-style access ကို off ထားပါ။
  11. capacity control လိုချင်လျှင် quota limit enable လုပ်ပြီး capacity limit နဲ့ threshold ထည့်ပါ။
  12. Save ကိုနှိပ်ပါ။

Add S3 configuration

စစ်ဆေးနည်း

Checkစစ်ဆေးပုံ
Channel card appearsSave ပြီးနောက် Upload Settings မှာ S3 channel card ပေါ်လာရပါမယ်။
Channel is enabledcard ရဲ့ညာဘက်အပေါ် switch က on ဖြစ်ရပါမယ်။
Key fields are saveddetail view မှာ Endpoint, Bucket, Region, path-style access နဲ့ related fields တွေမြင်ရပါမယ်။
Upload workstest image upload လုပ်ပြီး object က target bucket ထဲရောက်လားစစ်ပါ။
Link opensupload ပြီးနောက်ရတဲ့ image link ဖွင့်လို့ရရပါမယ်။
Capacity display worksquota 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 လုပ်သင့်လား?

များသောအားဖြင့် မလိုပါ။

သင့် S3-compatible provider က virtual-hosted-style URLs မထောက်ပံ့တဲ့အခါ၊ သို့မဟုတ် provider documentation က path-style access ကိုတိတိကျကျလိုအပ်တယ်ဆိုတဲ့အခါသာ enable လုပ်ပါ။

CDN domain က ဘာအတွက်လဲ?

bucket ရှေ့မှာ CDN သို့မဟုတ် custom access domain ထားထားလျှင် ဒီမှာထည့်ပါ။

configure ပြီးနောက် generated file links က ဒီ domain ကိုဦးစားပေးသုံးပါမယ်။ CDN မသုံးလျှင်ဗလာထားပါ။

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 မလိုဘူးလား၊ လိုရင် enable လုပ်ထားလား။

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 ထည့်ပါ
-> default အနေနဲ့ path-style access off ထားပါ
-> လိုအပ်လျှင် quota limit enable လုပ်ပါ
-> Save
-> test image upload လုပ်ပြီး result စစ်ပါ

Released as user documentation for CloudFlare ImgBed.