{"id":10553,"date":"2022-06-20T07:00:55","date_gmt":"2022-06-19T22:00:55","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=10553"},"modified":"2022-06-23T19:43:20","modified_gmt":"2022-06-23T10:43:20","slug":"%e3%80%90laravel%e3%80%91s3-%e3%81%ae%e4%bb%a3%e3%82%8f%e3%82%8a%e3%81%ab-linode-%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%83%bb%e3%82%b9%e3%83%88%e3%83%ac%e3%83%bc%e3%82%b8-%e3%82%92","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=10553","title":{"rendered":"\u3010Laravel\u3011S3 \u306e\u4ee3\u308f\u308a\u306b Linode \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30fb\u30b9\u30c8\u30ec\u30fc\u30b8 \u3092\u4f7f\u3046"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u5148\u65e5\u300c<strong><a href=\"https:\/\/blog.capilano-fw.com\/?p=10505\" target=\"_blank\" rel=\"noopener\">S3 \u306e\u4ee3\u308f\u308a\u306b Cloudflare R2 \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u4f7f\u3046<\/a><\/strong>\u300d\u3068\u3044\u3046\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u4e2d\u3067<code>Cloudflare<\/code>\u4ee5\u5916\u306b\u3082\u300c<strong>Amazon S3 \u3068\u4e92\u63db\u6027\u304c\u3042\u308b<\/strong>\u300d\u30b9\u30c8\u30ec\u30fc\u30b8\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308b\u3053\u3068\u3092\u77e5\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u304c\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">Linode Object Storage<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u300c<strong>Linode object storage<\/strong>\u300d\u3082<code>Cloudflare R2<\/code>\u306b\u8ca0\u3051\u305a\u52a3\u3089\u305a\u6599\u91d1\u304c\u5b89\u3044\u306e\u3067\u3001\u3082\u3057\u300c<strong>S3\u3001\u3061\u3087\u3063\u3068\u9ad8\u3044\u3088\u2026\ud83d\ude23<\/strong>\u300d\u3068\u611f\u3058\u3066\u3044\u308b\u65b9\u306b\u306f\u9078\u629e\u80a2\u306e\u3072\u3068\u3064\u306b\u306a\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u6599\u91d1\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\uff082022.5.20 \u73fe\u5728\uff09<\/p>\n<ul>\n<li>250 GB\uff1a \u6708\u984d $5<\/li>\n<li>\u8ee2\u9001\u30b3\u30b9\u30c8\u306f\u30011TB\u307e\u3067\u7121\u6599<\/li>\n<\/ul>\n<p>\u203b \u8a73\u3057\u304f\u306f\u3001<a href=\"https:\/\/www.linode.com\/ja\/products\/object-storage\/\" target=\"_blank\" rel=\"noopener\">\u672c\u5bb6\u306e\u30da\u30fc\u30b8<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\u65e5\u672c\u8a9e\u5bfe\u5fdc\u3057\u3066\u307e\u3059\ud83d\udc4d<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u3082\u3001\u300c<strong>Laravel + Linode Object Storage<\/strong>\u300d\u3067<code>S3<\/code>\u306e\u4ee3\u66ff\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\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\u3002\ud83d\ude04\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3566 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png\" alt=\"\" width=\"306\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png 306w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1-287x300.png 287w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/>\u300c\u30d4\u30b6\u3068\u4e00\u7dd2\u306b<br \/>\n\u5473\u564c\u6c41\uff06\u9903\u5b50\u3092\u98df\u3079\u308b\u3068\u3001<br \/>\n\u30b0\u30ed\u30fc\u30d0\u30eb\u5316\u3067\u304d\u305f\u6c17\u5206\u3067\u3059\u306d\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 9.x<\/p>\n<h1>Linode \u306b\u767b\u9332\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f<code>Linode<\/code>\u306b\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3057\u307e\u3059\u3002<br \/>\n<strong><a href=\"https:\/\/www.linode.com\/ja\/\">Linode<\/a> <\/strong>\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3078\u79fb\u52d5\u3057\u30da\u30fc\u30b8\u53f3\u4e0a\u306b\u3042\u308b\u300c<strong>\u767b\u9332<\/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-10559\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_2.png\" alt=\"\" width=\"306\" height=\"104\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_2.png 306w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_2-300x102.png 300w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/p>\n<p>\u300c<strong>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/strong>\u300d\u300c<strong>\u30e6\u30fc\u30b6\u30fc\u540d<\/strong>\u300d\u300c<strong>\u30d1\u30b9\u30ef\u30fc\u30c9<\/strong>\u300d\u3092\u5165\u529b\u3057\u3001\u300c<strong>Continue<\/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-10558\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_3.png\" alt=\"\" width=\"609\" height=\"415\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_3.png 609w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_3-300x204.png 300w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u5165\u529b\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u300c\u672c\u767b\u9332\u306eURL\u300d\u304c\u9001\u4fe1\u3055\u308c\u3066\u304f\u308b\u306e\u3067\u3001\u3053\u306e\u4e2d\u306b\u3042\u308b\u300c<strong>Confirm Email<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10557\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_4.png\" alt=\"\" width=\"587\" height=\"337\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_4.png 587w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_4-300x172.png 300w\" sizes=\"auto, (max-width: 587px) 100vw, 587px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u4f4f\u6240\u3084\u652f\u6255\u3044\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\u305d\u308c\u305e\u308c\u5165\u529b\u3057\u300c<strong>Create Account<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>Billing information<\/strong><\/p>\n<ul>\n<li>First Name\uff1a \u540d<\/li>\n<li>Last Name\uff1a \u59d3<\/li>\n<li>Company Name\uff1a \u4f1a\u793e\u540d\uff08\u7701\u7565\u53ef\uff09<\/li>\n<li>Address\uff1a \uff08\u5e02\u533a\u753a\u6751\u4ee5\u964d\u306e\uff09\u4f4f\u6240<\/li>\n<li>Address 2\uff1a\u30d3\u30eb\u540d\u306a\u3069\uff08\u7701\u7565\u53ef\uff09<\/li>\n<li>Country\uff1a Japan<\/li>\n<li>Region\uff1a \u90fd\u9053\u5e9c\u770c<\/li>\n<li>City\uff1a \u5e02\u533a\u753a\u6751<\/li>\n<li>Postal Code\uff1a \u90f5\u4fbf\u756a\u53f7<\/li>\n<li>Phone\uff1a \u96fb\u8a71\u756a\u53f7\uff08\u7701\u7565\u53ef\uff09<\/li>\n<li>Tax ID\uff1a \u7d0d\u7a0e\u8005\u756a\u53f7\uff08\u7701\u7565\u53ef\uff09<\/li>\n<\/ul>\n<p><strong>Secure Payment<\/strong><\/p>\n<ul>\n<li>Credit Card Number\uff1a \u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u756a\u53f7<\/li>\n<li>Expiration\uff1a \u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u306e\u6709\u52b9\u671f\u9650<\/li>\n<li>CVV\uff1a \u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u306e\u88cf\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\uff13\u301c\uff14\u6841\u306e\u756a\u53f7<\/li>\n<li>Master Services Agreement\uff1a \u5229\u7528\u898f\u7d04\u3078\u306e\u540c\u610f\u3067\u3059\u3002\u898f\u7d04\u3092\u8aad\u3093\u3067\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10556\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_5.png\" alt=\"\" width=\"249\" height=\"700\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_5.png 249w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_5-107x300.png 107w\" sizes=\"auto, (max-width: 249px) 100vw, 249px\" \/><\/p>\n<p>\u9001\u4fe1\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b8c\u4e86\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u300c<strong>Go to Cloud Manager<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3078\u79fb\u52d5\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10554\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_6.png\" alt=\"\" width=\"435\" height=\"217\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_6.png 435w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_6-300x150.png 300w\" sizes=\"auto, (max-width: 435px) 100vw, 435px\" \/><\/p>\n<p>\u3053\u308c\u3067\u3001\u767b\u9332\u306f\u5b8c\u4e86\u3067\u3059\u2757<\/p>\n<h1>\u30d0\u30b1\u30c3\u30c8\uff08\u30d5\u30a9\u30eb\u30c0\uff09\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u7d9a\u3044\u3066\u300c<strong>Object Storage<\/strong>\u300d\u3067\u30d0\u30b1\u30c3\u30c8\uff08\u4fdd\u5b58\u30d5\u30a9\u30eb\u30c0\uff09\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30da\u30fc\u30b8\u5de6\u5074\u30e1\u30cb\u30e5\u30fc\u306b\u3042\u308b\u300c<strong>Object Storage<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10570\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_7.png\" alt=\"\" width=\"190\" height=\"480\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_7.png 190w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_7-119x300.png 119w\" sizes=\"auto, (max-width: 190px) 100vw, 190px\" \/><\/p>\n<p><code>Object Storage<\/code>\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3078\u79fb\u52d5\u3059\u308b\u306e\u3067\u3001\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-10569\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_8.png\" alt=\"\" width=\"640\" height=\"367\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_8.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_8-300x172.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30d0\u30b1\u30c3\u30c8\u306e\u60c5\u5831\u3092\u5165\u529b\u3059\u308b\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001<code>Label<\/code>\u306b\u30d0\u30b1\u30c3\u30c8\u540d\u3001<code>Region<\/code>\u306b\u4fdd\u5b58\u3059\u308b\u5730\u57df\uff08\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb\u304c\u4e00\u756a\u8fd1\u3044\u306e\u3067\u3001\u901f\u5ea6\u306e\u3053\u3068\u3092\u8003\u3048\u3066\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb\u306b\u3057\u307e\u3057\u305f\uff09\u3092\u9078\u629e\u3057\u300c<strong>Create Bucket<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10567\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_9.png\" alt=\"\" width=\"455\" height=\"276\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_9.png 455w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_9-300x182.png 300w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/p>\n<p>\u203b \u306a\u304a\u3001\u3069\u3046\u3084\u3089\u6771\u4eac\u306b\u3082\u300c<strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30b9\u30c8\u30ec\u30fc\u30b8<\/strong>\u300d\u30b5\u30fc\u30d0\u30fc\u304c\u8a2d\u7f6e\u3055\u308c\u308b\u3088\u3046\u306a\u306e\u3067\u3001\u3082\u3057\u6771\u4eac\u304c\u5b58\u5728\u3057\u3066\u3044\u305f\u3089\u3001\u305d\u3061\u3089\u306e\u65b9\u304c\u3088\u308a\u826f\u3044\u3067\u3057\u3087\u3046\ud83d\udc4d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10560\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_1.png\" alt=\"\" width=\"614\" height=\"342\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_1.png 614w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_1-300x167.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u4e8b\u524d\u306b\u652f\u6255\u3044\u306b\u95a2\u3059\u308b\u60c5\u5831\u304c\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u3055\u308c\u308b\u306e\u3067\u3001\u300c<strong>Enable Object Storage<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10568\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_10.png\" alt=\"\" width=\"597\" height=\"292\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_10.png 597w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_10-300x147.png 300w\" sizes=\"auto, (max-width: 597px) 100vw, 597px\" \/><\/p>\n<p>\u767b\u9332\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10566\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_11.png\" alt=\"\" width=\"585\" height=\"204\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_11.png 585w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_11-300x105.png 300w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/p>\n<p>\u3067\u306f\u3001\u30d0\u30b1\u30c3\u30c8\u540d\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>.env<\/code>\u3078\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>.env<\/strong><\/p>\n<pre><strong>LINODE_OBJECT_STORAGE_BUCKET=\"**********\"<\/strong><\/pre>\n<p>\u307e\u305f\u3001\u300c<strong>\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8URL<\/strong>\u300d\u3068\u300c<strong>Region<\/strong>\u300d\u306f\u4ee5\u4e0b\u30da\u30fc\u30b8\u306e\u300c<strong>Cluster URL (S3 endpoint)<\/strong>\u300d\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u3061\u3089\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/www.linode.com\/docs\/products\/storage\/object-storage\/guides\/urls\/#cluster-url-s3-endpoint\" target=\"_blank\" rel=\"noopener\">Guides &#8211; Access Buckets and Files through URLs<\/a><\/p>\n<p><strong>.env<\/strong><\/p>\n<pre><strong>LINODE_OBJECT_STORAGE_REGION=\"ap-south-1\"\r\n<\/strong><strong>LINODE_OBJECT_STORAGE_ENDPOINT=\"https:\/\/ap-south-1.linodeobjects.com\"<\/strong><\/pre>\n<p>\u203b \u30b7\u30f3\u30ac\u30dd\u30fc\u30eb\u3092\u9078\u629e\u3057\u305f\u5834\u5408\u306f\u30b3\u30d4\u30da\u30fc\u3067OK\u3067\u3059\u3002<\/p>\n<h1>API \u30ad\u30fc\u3092\u53d6\u5f97\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u7d9a\u3044\u3066<code>Laravel<\/code>\u5074\u304b\u3089<code>Linode<\/code>\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u300c<strong>API \u30a2\u30af\u30bb\u30b9\u30ad\u30fc<\/strong>\u300d\uff06\u300c<strong>API \u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30ad\u30fc<\/strong>\u300d\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p><code>Object Storage<\/code>\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306b\u3042\u308b\u300c<strong>Access Keys<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10565\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_12.png\" alt=\"\" width=\"459\" height=\"150\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_12.png 459w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_12-300x98.png 300w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/p>\n<p>\u307e\u3060\u300cAPI \u30ad\u30fc\u300d\u306f\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30da\u30fc\u30b8\u53f3\u4e0a\u306b\u3042\u308b\u300c<strong>Create Access Key<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u767b\u9332\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10564\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_13.png\" alt=\"\" width=\"291\" height=\"122\" \/><\/p>\n<p><code>Label<\/code>\u306b\u8b58\u5225\u3057\u3084\u3059\u3044\uff08\u304a\u597d\u307f\u306e\uff09\u540d\u524d\u3092\u5165\u529b\u3057\u3001\u3082\u3057\u6761\u4ef6\u6307\u5b9a\u3057\u305f\u3044\u5834\u5408\u306f\u300c<strong>Limited Access<\/strong>\u300d\u3092\u30aa\u30f3\u306b\u3057\u3066\u305d\u308c\u305e\u308c\u9078\u629e\u3057\u3001\u6700\u7d42\u7684\u306b\u300c<strong>Create Access Key<\/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-10563\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_14.png\" alt=\"\" width=\"640\" height=\"456\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_14.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_14-300x214.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u300c<strong>Access Key<\/strong>\u300d\u3068\u300c<strong>Secret Key<\/strong>\u300d\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u3053\u308c\u3082<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-10562\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_15.png\" alt=\"\" width=\"578\" height=\"284\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_15.png 578w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_15-300x147.png 300w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/p>\n<p><strong>.env<\/strong><\/p>\n<pre><strong>LINODE_OBJECT_STORAGE_ACCESS_KEY=\"**********************\"<\/strong>\r\n<strong>LINODE_OBJECT_STORAGE_SECRET_KEY=\"***************************\"<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u3001API \u30ad\u30fc\u306e\u53d6\u5f97\u3082\u5b8c\u4e86\u3067\u3059\u2757<\/p>\n<h1>Laravel \u3092 Linode \u306b\u5bfe\u5fdc\u3055\u305b\u308b<\/h1>\n<p><code>Linode Object Storage<\/code>\u306f\u3001<code>Cloudflare R2<\/code>\u3068\u540c\u3058\u304f\u3001<code>Amazon S3<\/code>\u3068\u306e\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>\u305f\u3060\u3057\u3001\u3053\u306e\u307e\u307e\u3067\u306f<code>Linode object storage<\/code>\u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u65b0\u898f\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><strong>config\/filesystems.php<\/strong><\/p>\n<pre>\/\/\u3000\u7701\u7565\r\n\r\n'disks' =&gt; [\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n<strong>    'linode' =&gt; [<\/strong>\r\n<strong>        'driver' =&gt; 's3', \/\/ \ud83d\udc48 \u4e92\u63db\u6027\u304c\u3042\u308b\u306e\u3067\u3001\u3053\u3053\u306f s3 \u3067 OK<\/strong>\r\n<strong>        'key' =&gt; env('LINODE_OBJECT_STORAGE_ACCESS_KEY'),<\/strong>\r\n<strong>        'secret' =&gt; env('LINODE_OBJECT_STORAGE_SECRET_KEY'),<\/strong>\r\n<strong>        'region' =&gt; env('LINODE_OBJECT_STORAGE_REGION'),<\/strong>\r\n<strong>        'bucket' =&gt; env('LINODE_OBJECT_STORAGE_BUCKET'),<\/strong>\r\n<strong>        'endpoint' =&gt; env('LINODE_OBJECT_STORAGE_ENDPOINT'),<\/strong>\r\n<strong>    ],<\/strong>\r\n\r\n],<\/pre>\n<p>\u3053\u308c\u3067\u6e96\u5099\u306f\u5b8c\u4e86\u3067\u3059\u2757<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u5b9f\u969b\u306e\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001<code>\/storage\/app\/images<\/code>\u306b\u4ee5\u4e0b\u306e\u753b\u50cf\u3092\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10571\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_16.png\" alt=\"\" width=\"332\" height=\"229\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_16.png 332w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_16-300x207.png 300w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u6298\u89d2\u306a\u306e\u3067\u4eca\u56de\u306f\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\uff08\u30d5\u30a3\u30fc\u30c1\u30e3\u30fc\u30c6\u30b9\u30c8\uff09\u3092\u3064\u304f\u3063\u3066\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\uff08\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u306f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\uff09\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30fb\u30c6\u30b9\u30c8<\/h2>\n<p>\u307e\u305a\u306f URL \u3068\u3057\u3066\u516c\u958b\u3057\u306a\u3044\u300c<strong>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8<\/strong>\u300d\u8a2d\u5b9a\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u3001\u5185\u5bb9\u306f\u4ee5\u4e0b\u306e\uff12\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30d5\u30a1\u30a4\u30eb\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u308b\u304b\uff08\u30cd\u30c3\u30c8\u306b\u516c\u958b\u306f\u3057\u306a\u3044\uff09<\/li>\n<li>\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u30d0\u30b1\u30c3\u30c8\u306b\u5b58\u5728\u3057\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af<\/li>\n<\/ul>\n<p>\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:test LinodeObjectStorageTest<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p><strong>tests\/Feature\/LinodeObjectStorageTest.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace Tests\\Feature;\r\n\r\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\r\nuse Illuminate\\Foundation\\Testing\\WithFaker;\r\n<strong>use Illuminate\\Support\\Facades\\Storage;<\/strong>\r\nuse Tests\\TestCase;\r\n\r\nclass LinodeObjectStorageTest extends TestCase\r\n{\r\n    <strong>const FILENAME = 'no_15.png';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u308b\u304b\u30c1\u30a7\u30c3\u30af<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function test_can_upload()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $filename = self::FILENAME;<\/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('linode')-&gt;put($filename, $content);<\/strong>\r\n\r\n<strong>        $this-&gt;assertTrue($result);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u304b\u30c1\u30a7\u30c3\u30af<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function test_can_confirm_file_exists()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $filename = self::FILENAME;<\/strong>\r\n<strong>        $exists = Storage::disk('linode')-&gt;exists($filename);<\/strong>\r\n\r\n<strong>        $this-&gt;assertTrue($exists);<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>php artisan test --filter LinodeObjectStorageTest<\/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-10572\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_18.png\" alt=\"\" width=\"432\" height=\"184\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_18.png 432w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_18-300x128.png 300w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u3044\u3063\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001<code>Linode<\/code>\u306e\u65b9\u3067\u3082\u30da\u30fc\u30b8\u3092\u30ea\u30ed\u30fc\u30c9\u3057\u3066\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u306a\u3063\u305f\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-10573\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_17.png\" alt=\"\" width=\"513\" height=\"351\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_17.png 513w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_17-300x205.png 300w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u30d5\u30a1\u30a4\u30eb\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<h2>URL \u3068\u3057\u3066\u516c\u958b\u3059\u308b\u300c\u30d1\u30d6\u30ea\u30c3\u30af\u300d\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30fb\u30c6\u30b9\u30c8<\/h2>\n<p>\u305f\u3060\u3057\u3001\u3053\u308c\u306f\u300c<strong>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u8a2d\u5b9a<\/strong>\u300d\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u3059\u306e\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3082\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u62d2\u5426\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10574\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_19.png\" alt=\"\" width=\"538\" height=\"182\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_19.png 538w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_19-300x101.png 300w\" sizes=\"auto, (max-width: 538px) 100vw, 538px\" \/><\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u300c<strong>\u516c\u958b\u8a2d\u5b9a<\/strong>\u300d\u3092\u3057\u3066\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\uff08\u5148\u307b\u3069\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u524a\u9664\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p>\u30c6\u30b9\u30c8\u5185\u5bb9\u306f\u4ee5\u4e0b\uff12\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30d5\u30a1\u30a4\u30eb\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u308b\u304b\uff08\u30cd\u30c3\u30c8\u4e0a\u306b\u516c\u958b\u3059\u308b\uff09<\/li>\n<li>\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f URL \u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u304b\u30c1\u30a7\u30c3\u30af<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u304c\u516c\u958b\u8a2d\u5b9a\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>tests\/Feature\/LinodeObjectStorageTest.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace Tests\\Feature;\r\n\r\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\r\nuse Illuminate\\Foundation\\Testing\\WithFaker;\r\n<strong>use Illuminate\\Support\\Facades\\Http;<\/strong>\r\n<strong>use Illuminate\\Support\\Facades\\Storage;<\/strong>\r\nuse Tests\\TestCase;\r\n\r\nclass LinodeObjectStorageTest extends TestCase\r\n{\r\n    <strong>const FILENAME = 'no_15.png';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * \u516c\u958b\u8a2d\u5b9a\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u308b\u304b\u30c1\u30a7\u30c3\u30af<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function test_can_upload_publicly()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $filename = self::FILENAME;<\/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('linode')-&gt;put($filename, $content, 'public'); \/\/ \ud83d\udc48 \u7b2c\uff13\u5f15\u6570\u3092 public \u306b\u3059\u308b<\/strong>\r\n\r\n<strong>        $this-&gt;assertTrue($result);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c URL \u3068\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u304b\u30c1\u30a7\u30c3\u30af<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function test_can_access_url_online()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $bucket = config('filesystems.disks.linode.bucket');<\/strong>\r\n<strong>        $region = config('filesystems.disks.linode.region');<\/strong>\r\n<strong>        $filename = self::FILENAME;<\/strong>\r\n<strong>        $url = 'https:\/\/'. $bucket .'.'. $region .'.linodeobjects.com\/'. $filename;<\/strong>\r\n\r\n<strong>        $response = Http::get($url);<\/strong>\r\n<strong>        $this-&gt;assertTrue($response-&gt;successful());<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3067\u306f\u3001\u3053\u3061\u3089\u3082\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30c9\u30ad\u30c9\u30ad\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10575\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_20.png\" alt=\"\" width=\"431\" height=\"194\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_20.png 431w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_20-300x135.png 300w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><\/p>\n<p>\u306f\u3044\u2757\u516c\u958b\u8a2d\u5b9a\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u3046\u307e\u304f\u3044\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u5ff5\u306e\u305f\u3081\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u3082\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10576\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_21.png\" alt=\"\" width=\"500\" height=\"405\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_21.png 500w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_21-300x243.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u3082\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u6642\u9593\u5236\u9650\u304c\u3042\u308b\u300c\u7f72\u540d\u3064\u304dURL\u300d\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30fb\u30c6\u30b9\u30c8<\/h2>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\u6642\u9593\u5236\u9650\u304c\u3042\u308b\u300c<strong>\u7f72\u540d\u4ed8\u304dURL<\/strong>\u300d\u304c\u3046\u307e\u304f\u3044\u304f\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4ee5\u4e0b\u306f\u7f72\u540d\u3064\u304dURL\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\u3002<\/p>\n<p><strong>tests\/Feature\/LinodeObjectStorageTest.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace Tests\\Feature;\r\n\r\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\r\nuse Illuminate\\Foundation\\Testing\\WithFaker;\r\n<strong>use Illuminate\\Support\\Facades\\Http;<\/strong>\r\n<strong>use Illuminate\\Support\\Facades\\Storage;<\/strong>\r\nuse Tests\\TestCase;\r\n\r\nclass LinodeObjectStorageTest extends TestCase\r\n{\r\n    <strong>const FILENAME = 'no_15.png';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * \u7f72\u540d\u4ed8\u304dURL\u7528\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u308b\u304b\u30c1\u30a7\u30c3\u30af<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function test_can_upload_for_sign_url()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $filename = self::FILENAME;<\/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('linode')-&gt;put($filename, $content); \/\/ \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3068\u3057\u3066\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/strong>\r\n\r\n<strong>        $this-&gt;assertTrue($result);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * \u7f72\u540d\u4ed8\u304d URL \u304c\u3046\u307e\u304f\u52d5\u304f\u304b\u30c1\u30a7\u30c3\u30af<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function test_can_see_signed_url_works()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $expiration_seconds = 3; \/\/ \u6709\u52b9\u671f\u9650\u306f3\u79d2<\/strong>\r\n<strong>        $filename = self::FILENAME;<\/strong>\r\n<strong>        $expires = now()-&gt;addSeconds($expiration_seconds);<\/strong>\r\n<strong>        $signed_url = Storage::disk('linode')-&gt;temporaryUrl($filename, $expires); \/\/ \u7f72\u540d\u4ed8\u304dURL<\/strong>\r\n<strong>        $response = Http::get($signed_url);<\/strong>\r\n\r\n<strong>        $this-&gt;assertTrue($response-&gt;successful()); \/\/ \u6709\u52b9\u671f\u9650\u5185\u306a\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b<\/strong>\r\n\r\n<strong>        sleep($expiration_seconds); \/\/ 3\u79d2\u5f85\u3064<\/strong>\r\n<strong>        $response = Http::get($signed_url);<\/strong>\r\n\r\n<strong>        $this-&gt;assertTrue($response-&gt;failed()); \/\/ \u6709\u52b9\u671f\u9650\u5207\u308c\u306a\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3067\u306f\u3001\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10583\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_22.png\" alt=\"\" width=\"432\" height=\"197\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_22.png 432w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_linode_object_storage_22-300x137.png 300w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u7f72\u540d\u3064\u304d\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u30c6\u30b9\u30c8\u3092\u901a\u904e\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<p>\u203b \u306a\u304a\u3001\u5b9f\u969b\u306e\u30c6\u30b9\u30c8\u3067\u306f\u3001\u30c6\u30b9\u30c8\u7d42\u4e86\u6642\u306b\u5b9f\u884c\u3055\u308c\u308b\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u3092\u30bb\u30c3\u30c8\u3057\u3001\u305d\u306e\u4e2d\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3059\u308b\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n<strong>public function setUp(): void<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    parent::setUp();<\/strong>\r\n\r\n<strong>    $this-&gt;beforeApplicationDestroyed(function() {<\/strong>\r\n\r\n<strong>        \/\/ \u3053\u3053\u3067\u524a\u9664\u51e6\u7406<\/strong>\r\n\r\n<strong>    });<\/strong>\r\n<strong>}<\/strong>\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u3082\u3057<code>Amazon S3<\/code>\u3068\u5168\u304f\u540c\u3058\u5229\u7528\u3092\u3057\u305f\u3068\u4eee\u5b9a\u3059\u308b\u3068\u3001<code>Linode<\/code>\u306e\u5834\u5408\u306f\u5229\u7528\u6599\u91d1\u3092\u30b3\u30b9\u30c8\u30ab\u30c3\u30c8\u3067\u304d\u308b\u3053\u3068\u304c\u60f3\u5b9a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b<code>Linode<\/code>\u306e\u30da\u30fc\u30b8\u3067\u3082<code>AWS<\/code>\u3068<code>Google Cloud<\/code>\u3068\u306e\u5229\u7528\u6599\u91d1\u6bd4\u8f03\u3092\u63b2\u8f09\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u305c\u3072\u3054\u89a7\u306b\u306a\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003URL<\/strong>\uff1a\u00a0<a href=\"https:\/\/www.linode.com\/products\/object-storage\/\">\u9ad8\u3044\u8ee2\u9001\u30b3\u30b9\u30c8\u3092\u907f\u3051\u3066\u7bc0\u7d04\u3057\u3088\u3046\uff01<\/a><\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u3082\u3057\u56fa\u5b9a\u8cbb\u3092\u6052\u4e45\u7684\u306b\u30b3\u30b9\u30c8\u30ab\u30c3\u30c8\u3057\u305f\u3044\u3068\u304a\u8003\u3048\u3067\u3057\u305f\u3089\u3001\u305c\u3072\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude04\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u300c<strong>Laravel + Linode Object Storage<\/strong>\u300d\u3067<code>Amazon S3<\/code>\u306e\u4ee3\u66ff\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u6599\u91d1\u306b\u95a2\u3057\u3066\u306f\u3001<code>Cloudflare R2<\/code>\u306e\u8ee2\u9001\u6599\u91d1\u304c\u7121\u6599\u3067\u3059\u306e\u3067\u3001\u3068\u3066\u3082\u6709\u5229\u306a\u306e\u3067\u3059\u304c\uff08\u500b\u4eba\u7684\u306b\u3067\u3059\u304c\uff09\u3001<code>Linode<\/code>\u306e\u65b9\u304c\u5b89\u5b9a\u3057\u3066\u3044\u308b\u5370\u8c61\u3092\u53d7\u3051\u307e\u3057\u305f\u306e\u3067\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u69d8\u65b9\u306b\u306f\u304a\u3059\u3059\u3081\u304b\u306a\u3001\u3068\u3044\u3063\u305f\u5370\u8c61\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u9014\u4e2d\u3067\u3082\u66f8\u304d\u307e\u3057\u305f\u304c<code>Linode<\/code>\u306f\u6771\u4eac\u30ea\u30fc\u30b8\u30e7\u30f3\u3067\u3082\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30fb\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u958b\u59cb\u3059\u308b\u4e88\u5b9a\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067\u3001\u3055\u3089\u306b\u65e5\u672c\u3067\u3082\u4f7f\u3044\u52dd\u624b\u304c\u3088\u304f\u306a\u308b\u6c17\u304c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306f\u30b9\u30c6\u30de\u3063\u307d\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u304c\ud83d\ude02\u3001\u305d\u306e\u3042\u305f\u308a\u306f\u305c\u3072\u7686\u3055\u3093\u3054\u81ea\u8eab\u3067\u8a66\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-6066 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_23.png\" alt=\"\" width=\"370\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_23.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_23-300x259.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300c\u98a8\u5442\u4e0a\u304c\u308a\u306f\u3001<br \/>\n\u5e3d\u5b50\u3092\u304b\u3076\u3063\u3066<br \/>\n\u7e2e\u6bdb\u77ef\u6b63\u3057\u3066\u3044\u307e\u3059\ud83d\udc4d\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u5148\u65e5\u300cS3 \u306e\u4ee3\u308f\u308a\u306b Cloudflare R2 \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u4f7f\u3046\u300d\u3068\u3044\u3046\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u4e2d\u3067Cloudflare\u4ee5\u5916\u306b\u3082\u300cAmazon  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=10553\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel\u3011S3 \u306e\u4ee3\u308f\u308a\u306b Linode \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30fb\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":10581,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-10553","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\/10553","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=10553"}],"version-history":[{"count":9,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10553\/revisions"}],"predecessor-version":[{"id":10741,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10553\/revisions\/10741"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/10581"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}