{"id":10505,"date":"2022-05-23T07:00:19","date_gmt":"2022-05-22T22:00:19","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=10505"},"modified":"2022-05-19T04:45:55","modified_gmt":"2022-05-18T19:45:55","slug":"%e3%80%90laravel%e3%80%91s3-%e3%81%ae%e4%bb%a3%e3%82%8f%e3%82%8a%e3%81%ab-cloudflare-r2-%e3%82%b9%e3%83%88%e3%83%ac%e3%83%bc%e3%82%b8%e3%82%92%e4%bd%bf%e3%81%86","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=10505","title":{"rendered":"\u3010Laravel\u3011S3 \u306e\u4ee3\u308f\u308a\u306b Cloudflare R2 \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u4f7f\u3046"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u308c\u3082<code>Twitter<\/code>\u7d4c\u7531\u3067\u4ed5\u5165\u308c\u305f\u306e\u3067\u3059\u304c\u3001\u300c<strong>Cloudflare \u304c S3 \u4e92\u63db\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u300eR2\u300f\u3092\u30d9\u30fc\u30bf\u516c\u958b<\/strong>\u300d\u3068\u3044\u3046\u30cb\u30e5\u30fc\u30b9\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u3053\u306e\u30cb\u30e5\u30fc\u30b9\u3067\u4e00\u756a\u300c\u76db\u308a\u4e0a\u304c\u3063\u305f\u30dd\u30a4\u30f3\u30c8\u300d\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u6599\u91d1\u304c\u5b89\u3044\uff01<\/strong><\/p>\n<p>\u3068\u3044\u3046\u70b9\u3067\u3059\u3002<\/p>\n<p>\u203b \u3061\u306a\u307f\u306b\u3001<code>Cloudflare<\/code>\u306f\u904e\u53bb\u306b\u300c<strong>Amazon\u3055\u3093\u3001\u8ee2\u9001\u91cf\u9ad8\u3059\u304e\u3067\u3057\u3087\uff01<\/strong>\u300d\u3068\u6279\u5224\u3057\u305f\u3053\u3068\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/gigazine.net\/news\/20210726-cloudflare-aws-egress-fees\/\" target=\"_blank\" rel=\"noopener\">GIGAZINE: AWS\u306e\u8ee2\u9001\u6599\u91d1\u306f\u6cd5\u5916\u306a\u307b\u3069\u306b\u9ad8\u984d\u3060\u3068Cloudflare\u304c\u6279\u5224<\/a><\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001<code>R2<\/code>\u306e\u300c<strong>\u7121\u6599\u67a0<\/strong>\u300d\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002\uff082022.5.18 \u73fe\u5728\uff09<\/p>\n<ul>\n<li>10 GB\uff0f\u6708 \u304c\u7121\u6599 \ud83d\ude33\u2757<\/li>\n<li>\u4f5c\u6210\u3084\u66f4\u65b0\u306e\u51e6\u7406\uff1a 100\u4e07\u56de \u307e\u3067\u7121\u6599 \ud83d\ude33\u2757<\/li>\n<li>\u95b2\u89a7\u3060\u3051\u306e\u51e6\u7406\uff1a1,000\u4e07\u56de \u307e\u3067\u7121\u6599 \ud83d\ude33\u2757<\/li>\n<\/ul>\n<p>\u3057\u304b\u3082<strong>\u4e0b\u308a\u6599\u91d1\uff08<code>R2<\/code> \u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3059\u308b\u6642\u306e\u6599\u91d1\uff09\u3082\u7121\u6599<\/strong>\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u3061\u3089\u3082\u7834\u683c\u306e\u6599\u91d1\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\uff08\u500b\u4eba\u30b5\u30a4\u30c8\u3060\u3051\u306a\u3089\u3001\u3080\u3057\u308d\u6709\u6599\u306b\u306a\u308b\u65b9\u304c\u96e3\u3057\u3044\u304b\u3082\u3067\u3059\u306d\ud83d\ude02\uff09<\/p>\n<p>\u203b \u6b8b\u308a\u306f <a href=\"https:\/\/developers.cloudflare.com\/r2\/platform\/pricing\/#r2-pricing\" target=\"_blank\" rel=\"noopener\">\u672c\u5bb6\u306e\u6599\u91d1\u30da\u30fc\u30b8<\/a> \u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u3053\u306e\u65b0\u30b9\u30c8\u30ec\u30fc\u30b8\u30b5\u30fc\u30d3\u30b9\u300c<strong>Cloudflare R2<\/strong>\u300d\u3092<code>Laravel<\/code>\u3067\u4f7f\u3046\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\ud83d\ude04<\/p>\n<p>\u203b \u4eca\u56de\u306f\u7dca\u6025\u6295\u7a3f\u3068\u3044\u3046\u3053\u3068\u3067\u300c<strong>Laravel + mailgun \u3067\u30e1\u30eb\u30de\u30ac\u3092\u4e00\u6c17\u306b\u5168\u54e1\u3078\u9001\u4fe1\u3059\u308b<\/strong>\u300d\u306f\u6765\u9031\u516c\u958b\u3057\u307e\u3059\u3002\u3082\u3057\u697d\u3057\u307f\u306b\u3055\u308c\u3066\u3044\u305f\u306a\u3089\u30b4\u30e1\u30f3\u30ca\u30b5\u30a4\u3002m(_ _)m<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4445 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png\" alt=\"\" width=\"370\" height=\"310\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2-300x251.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300c\u8ce2\u8005\u306e\u98df\u5353\u3001\u30de\u30b8\u3067<br \/>\n\uff08\u79c1\u306b\u306f\uff09\u52b9\u304d\u307e\u3057\u305f\u2757<br \/>\n\u304a\u306a\u304b\u30b9\u30c3\u30ad\u30ea\u2728\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 9.x<\/p>\n<h1>Cloudflare \u306b\u767b\u9332\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f<code>Cloudflare<\/code>\u3078\u767b\u9332\u3059\u308b\u3068\u3053\u308d\u304b\u3089\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n\u3082\u3057\u3059\u3067\u306b\u767b\u9332\u6e08\u307f\u306e\u65b9\u306f\u3001\u6b21\u306e\u9805\u76ee\u307e\u3067\u9032\u3093\u3067 OK \u3067\u3059\ud83d\udc4d<\/p>\n<p>\u203b \u306a\u304a\u3001\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u306f\u82f1\u8a9e\u7248\u3067\u3059\u304c\u3001\u65e5\u672c\u8a9e\u7248\u306b\u5207\u308a\u66ff\u3048\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u9069\u5b9c\u7167\u3089\u3057\u5408\u308f\u305b\u3066\u4f5c\u696d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u307e\u305a\u3001<strong><a href=\"https:\/\/www.cloudflare.com\/\" target=\"_blank\" rel=\"noopener\">Cloudflare<\/a> <\/strong>\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3078\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30da\u30fc\u30b8\u53f3\u4e0a\u306b\u3042\u308b\u300c<strong>Sign Up<\/strong>\u300d\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10510\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_1.png\" alt=\"\" width=\"303\" height=\"126\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_1.png 303w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_1-300x125.png 300w\" sizes=\"auto, (max-width: 303px) 100vw, 303px\" \/><\/p>\n<p>\u30da\u30fc\u30b8\u79fb\u52d5\u3059\u308b\u3068\u3001\u300c<strong>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/strong>\u300d\u3068\u300c<strong>\u30d1\u30b9\u30ef\u30fc\u30c9<\/strong>\u300d\u3092\u5165\u529b\u3059\u308b\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u305d\u308c\u305e\u308c\u5165\u529b\u3057\u3066\u300c<strong>Create Account<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10509\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_2.png\" alt=\"\" width=\"581\" height=\"430\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_2.png 581w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_2-300x222.png 300w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/p>\n<p>\u9001\u4fe1\u3059\u308b\u3068\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u4f5c\u6210\u3055\u308c\u3001\u300c<strong>\u8a8d\u8a3c\u30e1\u30fc\u30eb<\/strong>\u300d\u304c\u9001\u4fe1\u3055\u308c\u3066\u304d\u307e\u3059\u306e\u3067\u3001\u4e2d\u306b\u3042\u308b\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10508\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_3.png\" alt=\"\" width=\"459\" height=\"241\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_3.png 459w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_3-300x158.png 300w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/p>\n<p>\u3053\u308c\u3067\u3001<code>Cloudflare<\/code>\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u4f5c\u6210\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<\/p>\n<h1>Cloudflare R2 \u306e\u8a2d\u5b9a\u3092\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u7d9a\u3044\u3066<code>Cloudflare<\/code>\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30b5\u30fc\u30d3\u30b9\u300c<strong>R2<\/strong>\u300d\u306e\u8a2d\u5b9a\u3067\u3059\u3002<br \/>\n\u30da\u30fc\u30b8\u5de6\u5074\u30e1\u30cb\u30e5\u30fc\u306e\u4e2d\u304b\u3089\u300c<strong>R2<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10507\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_4.png\" alt=\"\" width=\"259\" height=\"418\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_4.png 259w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_4-186x300.png 186w\" sizes=\"auto, (max-width: 259px) 100vw, 259px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>R2<\/code>\u306e\u521d\u671f\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u300c<strong>Purchase R2 plan\uff08R2\u306e\u30d7\u30e9\u30f3\u3092\u8cfc\u5165\u3059\u308b\uff09<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10524\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_5.png\" alt=\"\" width=\"385\" height=\"448\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_5.png 385w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_5-258x300.png 258w\" sizes=\"auto, (max-width: 385px) 100vw, 385px\" \/><\/p>\n<p>\u30d7\u30e9\u30f3\u8a73\u7d30\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u300c<strong>Proceed to Payment Details\uff08\u652f\u6255\u3044\u60c5\u5831\u3078\u79fb\u52d5\uff09<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10523\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_6.png\" alt=\"\" width=\"640\" height=\"296\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_6.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_6-300x139.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u60c5\u5831\u3092\u5165\u529b\u3059\u308b\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08<code>Paypal<\/code> \u3082\u4f7f\u3048\u307e\u3059\uff09<\/p>\n<ul>\n<li>Card number\uff1a \u30ab\u30fc\u30c9\u756a\u53f7<\/li>\n<li>Expiration\uff1a \u6709\u52b9\u671f\u9650<\/li>\n<li>CVC\uff1a \u30ab\u30fc\u30c9\u306e\u88cf\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\uff13\u301c\uff14\u6841\u306e\u756a\u53f7<\/li>\n<li>Country\uff1a \u56fd\uff08Japan\uff09<\/li>\n<li>First name\uff1a \u540d<\/li>\n<li>Last name\uff1a \u59d3<\/li>\n<li>Country\uff1a \u56fd\uff08Japan\uff09<\/li>\n<li>Zip\/postal code\uff1a \u90f5\u4fbf\u756a\u53f7<\/li>\n<li>Purpose: Personal\uff08\u500b\u4eba\u7684\u306a\u4f7f\u7528\uff09<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10522\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_7.png\" alt=\"\" width=\"640\" height=\"376\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_7.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_7-300x176.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u203b \u306a\u304a\u3001\u79c1\u306e\u5834\u5408\u306f\u4e0d\u5177\u5408\u306a\u306e\u304b\u3001\u3053\u306e\u30d5\u30a9\u30fc\u30e0\u304b\u3089\u306f\u30af\u30ec\u30b8\u30c3\u30c8\u756a\u53f7\u3092\u767b\u9332\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u305d\u306e\u5834\u5408\u306f\u30da\u30fc\u30b8\u53f3\u4e0a\u306b\u3042\u308b\u30a2\u30ab\u30a6\u30f3\u30c8\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u300c<strong>Billing<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u540c\u3058\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u305d\u3053\u304b\u3089\u5148\u306b\u767b\u9332\u3059\u308b\u3053\u3068\u3067\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10521\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_8.png\" alt=\"\" width=\"305\" height=\"447\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_8.png 305w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_8-205x300.png 205w\" sizes=\"auto, (max-width: 305px) 100vw, 305px\" \/><\/p>\n<p><code>R2<\/code>\u306e\u767b\u9332\u304c\u5b8c\u4e86\u3057\u305f\u3089\u300c<strong>Return to R2<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066<code>R2<\/code>\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3078\u623b\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10520\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_9.png\" alt=\"\" width=\"484\" height=\"72\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_9.png 484w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_9-300x45.png 300w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/p>\n<h1>API \u30ad\u30fc\u306a\u3069\u306e\u63a5\u7d9a\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001<code>Laravel<\/code>\u306e<code>.env<\/code>\u306b\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u4ee5\u4e0b\uff14\u3064\u306e\u60c5\u5831\u3092\u305d\u308c\u305e\u308c\u53d6\u5f97\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>API \u30a2\u30af\u30bb\u30b9\u30ad\u30fc<\/li>\n<li>API \u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30ad\u30fc<\/li>\n<li>\u30d0\u30b1\u30c3\u30c8\u540d<\/li>\n<li>\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL<\/li>\n<\/ul>\n<h2>API \u30a2\u30af\u30bb\u30b9\u30ad\u30fc\uff06\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30ad\u30fc\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u3067\u306f\u3001\u307e\u305a<code>R2<\/code>\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u53f3\u4e0a\u306b\u3042\u308b\u300c<strong>Manage R2 API Tokens<\/strong>\u300d\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10519\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_10.png\" alt=\"\" width=\"383\" height=\"161\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_10.png 383w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_10-300x126.png 300w\" sizes=\"auto, (max-width: 383px) 100vw, 383px\" \/><\/p>\n<p>API \u30c8\u30fc\u30af\u30f3\u306e\u30da\u30fc\u30b8\u306b\u79fb\u52d5\u3059\u308b\u306e\u3067\u3001\u3055\u3089\u306b\u300c<strong>Create API token<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10518\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_11.png\" alt=\"\" width=\"278\" height=\"234\" \/><\/p>\n<p>\u4f5c\u6210\u3059\u308b\u30c8\u30fc\u30af\u30f3\u306e\u6a29\u9650\u3092\u9078\u629e\uff08\u4eca\u56de\u306f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u3044\u306e\u3067\u3001\u4f5c\u6210\u3084\u5909\u66f4\u304c\u3067\u304d\u308b\u6a29\u9650\u306b\u3057\u307e\u3059\uff09\u3057\u3001\u300c<strong>Create API Token<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10517\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_12.png\" alt=\"\" width=\"640\" height=\"319\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_12.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_12-300x150.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u300c<strong>API \u30a2\u30af\u30bb\u30b9\u30ad\u30fc<\/strong>\u300d\u3068\u300c<strong>API \u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30ad\u30fc<\/strong>\u300d\u306e\uff12\u3064\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u30b3\u30d4\u30da\u3057\u3066<code>.env<\/code>\u3078\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10516\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_13.png\" alt=\"\" width=\"640\" height=\"272\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_13.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_13-300x128.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u203b \u306a\u304a\u3001\u3053\u306e\u60c5\u5831\u306f\uff12\u5ea6\u3068\u8868\u793a\u3055\u308c\u306a\u3044\u306e\u3067\u5927\u5207\u306b\u4fdd\u7ba1\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>.env<\/strong><\/p>\n<pre><strong>CLOUDFLARE_R2_ACCESS_KEY=\"************************************\"<\/strong>\r\n<strong>CLOUDFLARE_R2_SECRET_KEY=\"************************************\"<\/strong><\/pre>\n<h2>\u30d0\u30b1\u30c3\u30c8\uff08\u4fdd\u5b58\u30d5\u30a9\u30eb\u30c0\uff09\u3092\u3064\u304f\u308b<\/h2>\n<p>\u7d9a\u3044\u3066\u3001<code>Laravel<\/code>\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306e\u30d0\u30b1\u30c3\u30c8\uff08\u30d5\u30a9\u30eb\u30c0\uff09\u306e\u4f5c\u6210\u3067\u3059\u3002<\/p>\n<p><code>R2<\/code>\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306b\u3042\u308b\u300c<strong>Create bucket<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10515\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_14.png\" alt=\"\" width=\"640\" height=\"290\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_14.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_14-300x136.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30d0\u30b1\u30c3\u30c8\u540d\u3092\u5165\u529b\u3059\u308b\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u304a\u597d\u307f\u3067\u540d\u524d\u3092\u5165\u529b\u3057\u300c<strong>Create bucket<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10514\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_15.png\" alt=\"\" width=\"520\" height=\"114\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_15.png 520w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_15-300x66.png 300w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10513\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_16.png\" alt=\"\" width=\"243\" height=\"73\" \/><\/p>\n<p>\u4f5c\u6210\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8868\u793a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10511\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_18.png\" alt=\"\" width=\"542\" height=\"141\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_18.png 542w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_18-300x78.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/p>\n<p>\u3067\u306f\u3001\u3053\u306e\u30d0\u30b1\u30c3\u30c8\u540d\u3082<code>Laravel<\/code>\u306e<code>.env<\/code>\u306b\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>.env<\/strong><\/p>\n<pre><strong>CLOUDFLARE_R2_BUCKET=\"**********\"<\/strong><\/pre>\n<h2>\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u6700\u5f8c\u306b\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL\u306e\u53d6\u5f97\u3067\u3059\u3002<br \/>\n\u3053\u306eURL\u306f<code>Cloudflare<\/code>\u306e\u300c<strong>\u30a2\u30ab\u30a6\u30f3\u30c8ID<\/strong>\u300d\u304c\u5143\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30ab\u30a6\u30f3\u30c8ID\u306f\u3001<code>R2<\/code> \u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3067\u306f\u30da\u30fc\u30b8\u53f3\u4e0a\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10525\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_19.png\" alt=\"\" width=\"380\" height=\"262\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_19.png 380w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_19-300x207.png 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8ID\u3092\u4f7f\u3063\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL\u3092\u3064\u304f\u308a\u3001<code>.env<\/code>\u3078\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>.env<\/strong><\/p>\n<pre><strong>CLOUDFLARE_R2_ENDPOINT=\"https:\/\/\uff08\u3053\u3053\u304c\u30a2\u30ab\u30a6\u30f3\u30c8ID\uff09.r2.cloudflarestorage.com\"<\/strong><\/pre>\n<h1>Laravel \u3092 R2 \u306b\u5bfe\u5fdc\u3055\u305b\u308b<\/h1>\n<p><code>R2<\/code>\u306f<code>Amazon S3<\/code>\u3068\u4e92\u63db\u6027\u304c\u3042\u308b\u306e\u3067\u3001<code>Amazon S3<\/code>\u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>composer require league\/flysystem-aws-s3-v3 \"^3.0\"<\/strong><\/pre>\n<p>\u305d\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u30b3\u30f3\u30d5\u30a3\u30b0\u30d5\u30a1\u30a4\u30eb\u306b\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><strong>config\/filesystems.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n'disks' =&gt; [\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n<strong>    'r2' =&gt; [<\/strong>\r\n<strong>        'driver' =&gt; 's3', <\/strong>\/\/ \ud83d\udc48 \u4e92\u63db\u6027\u304c\u3042\u308b\u306e\u3067\u3001s3 \u3067 OK\r\n<strong>        'key' =&gt; env('CLOUDFLARE_R2_ACCESS_KEY'),<\/strong>\r\n<strong>        'secret' =&gt; env('CLOUDFLARE_R2_SECRET_KEY'),<\/strong>\r\n<strong>        'region' =&gt; '', <\/strong>\/\/ \ud83d\udc48 \u7a7a\u767d\u3067\u3059\u304c\u3001\u7121\u3044\u3068\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\r\n<strong>        'bucket' =&gt; env('CLOUDFLARE_R2_BUCKET'),<\/strong>\r\n<strong>        'endpoint' =&gt; env('CLOUDFLARE_R2_ENDPOINT'),<\/strong>\r\n<strong>    ],<\/strong>\r\n\r\n],<\/pre>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3055\u3041\u3001\u3067\u306f\u5b9f\u969b\u306b<code>Laravel<\/code>\u304b\u3089<code>R2<\/code>\u3078\u753b\u50cf\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u308b\u304b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u3001<code>Laravel<\/code>\u306e<code>storage\/app\/images<\/code>\u30d5\u30a9\u30eb\u30c0\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u3044\u753b\u50cf\u3092\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10526\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_20.png\" alt=\"\" width=\"346\" height=\"232\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_20.png 346w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_20-300x201.png 300w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u30eb\u30fc\u30c8\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre><strong>use Illuminate\\Support\\Facades\\Storage;<\/strong>\r\n\r\n\/\/ \u7701\u7565\r\n\r\n<strong>Route::get('cloudflare_r2_upload', function(){<\/strong>\r\n\r\n<strong>    $filename = 'no_17.png';<\/strong>\r\n<strong>    $path = storage_path('app\/images\/'. $filename);<\/strong>\r\n<strong>    $content = file_get_contents($path);<\/strong>\r\n<strong>    $result = Storage::disk('r2')-&gt;put($filename, $content); \/\/ \ud83d\udc48 \u3053\u3053\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/strong>\r\n\r\n<strong>    dd($result);<\/strong>\r\n\r\n<strong>});\r\n<\/strong><\/pre>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u300c<strong>https:\/\/******\/cloudflare_r2_upload<\/strong>\u300d\u3078\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u3069\u3046\u306a\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10529\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_21.png\" alt=\"\" width=\"164\" height=\"42\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3067\u5c11\u3057\u5730\u5473\u3067\u3059\u304c\u3001\u6210\u529f\u3057\u305f\u3088\u3046\u3067\u3059\ud83d\ude04\u2728<\/p>\n<p>\u3067\u306f\u3001<code>Cloudflare R2<\/code>\u306e\u65b9\u3067\u3082\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10528\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_22.png\" alt=\"\" width=\"640\" height=\"270\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_22.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_22-300x127.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3053\u3061\u3089\u3082\u5148\u307b\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5168\u3066\u6210\u529f\u3067\u3059\u2728\ud83d\ude04\ud83d\udc4d<\/p>\n<h1>\u304a\u307e\u3051\uff1a\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u64cd\u4f5c\u3057\u3066\u307f\u308b\uff08Wrangler \u30b3\u30de\u30f3\u30c9\uff09<\/h1>\n<p>\u3061\u306a\u307f\u306b\u3001<code>Cloudflare<\/code>\u306b\u306f<code>Wrangler<\/code>\u3068\u547c\u3070\u308c\u308bCLI\u30c4\u30fc\u30eb\uff08\u30b3\u30de\u30f3\u30c9\uff09\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305b\u3063\u304b\u304f\u3067\u3059\u306e\u3067\u3001\u4eca\u56de\u306f\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u65b9\u6cd5\u3082\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2>Wrangler \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h2>\n<p><code>Wrangler<\/code>\u306f\u3001<code>npm<\/code>\u304b<code>yarn<\/code>\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306f<code>npm<\/code>\u3067\u5b9f\u884c\u3057\u307e\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>npm install -g wrangler<\/strong><\/pre>\n<p>\u203b \u30b0\u30ed\u30fc\u30d0\u30eb\u306a\u306e\u3067\u3001\u74b0\u5883\u306b\u3088\u3063\u3066\u306f<code>sudo<\/code>\u3044\u308b\u304b\u3082\ud83e\udd14<br \/>\n\u203b <code>npm<\/code>\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u3001<code>v16<\/code>\u4ee5\u4e0a\u304c\u5fc5\u8981\u3067\u3059\u3002\uff082022.5.19 \u73fe\u5728\uff09<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u3089\u8a8d\u8a3c\u3092\u3057\u307e\u3059\u3002<br \/>\n\u540c\u3058\u304f\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>wrangler login<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u81ea\u52d5\u3067\u30d6\u30e9\u30a6\u30b6\u306b\uff08<code>wrangler<\/code>\u306b\u8a31\u53ef\u3059\u308b\u5185\u5bb9\u304c\u7d30\u304b\u304f\u66f8\u304b\u308c\u3066\u3044\u308b\uff09\u78ba\u8a8d\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u300c<strong>Allow<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10534\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_23.png\" alt=\"\" width=\"306\" height=\"68\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_23.png 306w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_23-300x67.png 300w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/p>\n<p>\u3053\u308c\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u3067\u306f\u3001\u5148\u307b\u3069\u8ffd\u52a0\u3057\u305f\u30d0\u30b1\u30c3\u30c8\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u304b\u30ea\u30b9\u30c8\u8868\u793a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>wrangler r2 bucket list<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10535\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_24.png\" alt=\"\" width=\"432\" height=\"117\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_24.png 432w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_cloudflare_r2_24-300x81.png 300w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><\/p>\n<p>\u5148\u307b\u3069\u306e\u30d0\u30b1\u30c3\u30c8\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\ud83d\ude04\ud83d\udc4d<\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u3054\u7d39\u4ecb\u3057\u305f<code>Cloudflare R2<\/code>\u3092\u5229\u7528\u3059\u308b\u3068\u3001\uff08\u540c\u3058\u5229\u7528\u306a\u3089\uff09<code>Amazon S3<\/code>\u3088\u308a\u6599\u91d1\u304c\u5b89\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u72b6\u6cc1\u3067\u3057\u305f\u3089\u79fb\u884c\u3092\u304a\u8003\u3048\u306b\u306a\u3063\u3066\u307f\u3066\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<ul>\n<li>\u30af\u30e9\u30a6\u30c9\u3067\u4fdd\u7ba1\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u591a\u3044<\/li>\n<li>\u4fdd\u5b58\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u306e\u5bb9\u91cf\u304c\u5927\u304d\u3044<\/li>\n<li>\u4fdd\u7ba1\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u3088\u304f\u53d6\u308a\u51fa\u3059\uff08\u753b\u50cf\u306a\u3069\u306e\u30a2\u30af\u30bb\u30b9\uff09<\/li>\n<\/ul>\n<p>\u305c\u3072\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<br \/>\n\u304a\u5f85\u3061\u3057\u3066\u307e\u3059\ud83d\ude04\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>Laravel<\/code>\u3067<code>Cloudflare<\/code>\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><code>R2<\/code>\u306f\u3001\u300c<strong>S3\u306b\u4e92\u63db\u6027\u304c\u3042\u308b<\/strong>\u300d\u306e\u3067\u3001\u3053\u308c\u307e\u3067\u3088\u304f\u5229\u7528\u3057\u3066\u3044\u305f<code>composer<\/code>\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3060\u3051\u3067\u3059\u3057\u3001\u79fb\u884c\u306f\u305d\u308c\u307b\u3069\u96e3\u3057\u304f\u306f\u306a\u3044\u3093\u3058\u3083\u306a\u3044\u304b\u306a\u3068\u611f\u3058\u307e\u3057\u305f\u3002<\/p>\n<p>\u305f\u3060\u3001<code>AWS<\/code>\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001<code>EC2<\/code>\u3084\u305d\u306e\u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u3082\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308a\u3001\u305d\u308c\u3092\u8003\u3048\u308b\u3068\u898f\u6a21\u304c\u5927\u304d\u3044\u3082\u306e\u3092\u4e00\u6c17\u306b<code>Cloudflare<\/code>\u306b\u5f15\u3063\u8d8a\u3057\u3059\u308b\u306e\u306f\u5927\u5909\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u307e\u305f\u3001\u300c<strong>Amazon\u306f\u3084\u3063\u3071\u308a\u3046\u307e\u3044\u306a\u3041<\/strong>\u300d\u3068\u611f\u3058\u305f\u306e\u304c\u3001\u8ee2\u9001\u6599\u91d1\u3067\u3059\u3002<br \/>\n\u3053\u308c\u304c\u306a\u304b\u306a\u304b\u9ad8\u304f\u3064\u304f\u306e\u3067\u3001\u3064\u307e\u308a\u306f\u300c<strong>\u4e00\u5ea6\u4fdd\u5b58\u3057\u3066\u3057\u307e\u3063\u305f\u3082\u306e\u306f\u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u79fb\u884c\u3057\u306b\u304f\u3044<\/strong>\u300d\u3068\u3044\u3046\u72b6\u6cc1\u306b\u306a\u3063\u3066\u3044\u308b\u308f\u3051\u3067\u3059\u306d\u3002\u306a\u306e\u3067\u3001\u3084\u306f\u308a\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u7ba1\u3059\u308b\u5834\u5408\u306f\u5c06\u6765\u306e\u3053\u3068\u3082\u8003\u3048\u3066\u300c\u30ed\u30fc\u30ab\u30eb + \u30af\u30e9\u30a6\u30c9\u300d\u306e\u4e8c\u91cd\u306b\u3057\u3066\u304a\u304f\u3079\u304d\u306a\u3093\u3060\u308d\u3046\u306a\u3068\u611f\u3058\u307e\u3057\u305f\u3002\uff08\u3068\u306f\u8a00\u3048\u3001\u5bb9\u91cf\u304c\u5c11\u306a\u3044\u304b\u3089\u30af\u30e9\u30a6\u30c9\u3092\u4f7f\u3063\u3066\u308b\u3093\u3060\u3068\u3044\u3046\u5834\u5408\u3082\u3042\u308b\u3057\u3001\u30d1\u30e9\u30c9\u30c3\u30af\u30b9\u7684\u306a\u3068\u3053\u308d\u3082\u3042\u308b\u304b\u3082\u3067\u3059\u306d\u2026\ud83d\ude02\uff09<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u3053\u3046\u3044\u3063\u305f\u30b5\u30fc\u30d3\u30b9\u3092\u6709\u52b9\u306b\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9470 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png\" alt=\"\" width=\"294\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png 294w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13-276x300.png 276w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/>\u300c\u30d5\u30eb\u30fc\u30c1\u30a7\u306e\u30d4\u30fc\u30c1\u5473\u306f<br \/>\n\u4f9d\u5b58\u6027\u9ad8\u3044\u3067\u3059\u2728\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u308c\u3082Twitter\u7d4c\u7531\u3067\u4ed5\u5165\u308c\u305f\u306e\u3067\u3059\u304c\u3001\u300cCloudflare \u304c S3 \u4e92\u63db\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u300eR2\u300f\u3092\u30d9\u30fc\u30bf\u516c\u958b\u300d\u3068\u3044\u3046\u30cb\u30e5\u30fc\u30b9\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u305d\u3057 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=10505\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel\u3011S3 \u306e\u4ee3\u308f\u308a\u306b Cloudflare R2 \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u4f7f\u3046&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":10538,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-10505","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10505"}],"version-history":[{"count":8,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10505\/revisions"}],"predecessor-version":[{"id":10539,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10505\/revisions\/10539"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/10538"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}