{"id":1748,"date":"2021-09-11T06:02:42","date_gmt":"2021-09-10T21:02:42","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=1748"},"modified":"2022-12-29T18:22:00","modified_gmt":"2022-12-29T09:22:00","slug":"firebase","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=1748","title":{"rendered":"Firebase\u3067Web\u30a2\u30d7\u30ea\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<p>Firebase\u306fGoogle\u304c\u63d0\u4f9b\u3059\u308b\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002<br>\u30af\u30e9\u30a6\u30c9\u74b0\u5883\u306b\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u3069\u3092\u8a2d\u7f6e\u3057\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u305d\u308c\u3089\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u30b5\u30fc\u30d0\u30fc\u5074\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u306a\u3069\u3092\u7528\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Firebase\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210<\/h2>\n\n\n\n<p>\u307e\u305a\u306fFirebase\u4e0a\u3067\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002gmail\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3001Firebase\u306e\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3001\u7d9a\u3044\u3066\u3001\u4e2d\u592e\u306e\u300cGet started\u300d\u3067\u306f\u306a\u304f\u3001\u53f3\u4e0a\u306e\u300cGo to console\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/01\/firebase-1-1024x724.png\" alt=\"\" class=\"wp-image-836\"\/><\/figure>\n\n\n\n<p>gmail\u3067\u306e\u30ed\u30b0\u30a4\u30f3\u3092\u6c42\u3081\u3089\u308c\u308b\u306e\u3067\u3001\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/01\/firebase_login.png\" alt=\"\" class=\"wp-image-843\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/01\/firebase_project_add-1-1024x657.png\" alt=\"\" class=\"wp-image-847\"\/><\/figure>\n\n\n\n<p>\u6b21\u306b\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u540d\u79f0\u3092\u534a\u89d2\u82f1\u6570\u5b57\u3067\u5165\u529b\u3057\u3001\u4e0b\u6bb5\u306e\u300c\u7d9a\u884c\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/01\/firebase_project_name-1.png\" alt=\"\" class=\"wp-image-854\"\/><\/figure>\n\n\n\n<p>\u6b21\u306e\u753b\u9762\u3082\u305d\u306e\u307e\u307e\u300c\u7d9a\u884c\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002Web\u30a2\u30d7\u30ea\u3084\u30b5\u30a4\u30c8\u306e\u89e3\u6790\u306b\u6b20\u304b\u305b\u306a\u3044Google\u30a2\u30ca\u30ea\u30c6\u30a3\u30af\u30b9\u306f\u3001\u6709\u52b9\u306e\u307e\u307e\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/01\/firebase_project_2-2-1024x637.png\" alt=\"\" class=\"wp-image-857\"\/><\/figure>\n\n\n\n<p>Firebase\u5074\u306e\u6700\u5f8c\u306e\u8a2d\u5b9a\u3067\u3059\u3002Google\u30a2\u30ca\u30ea\u30c6\u30a3\u30af\u30b9\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u3042\u308b\u4eba\u306f\u3001\u540c\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u9078\u629e\u3057\u3001\u6301\u3063\u3066\u306a\u3044\u4eba\u306f\u3053\u3053\u3067\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u3063\u305f\u5f8c\u3001\u53f3\u4e0b\u306e\u300c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/01\/firebase_project_3.png\" alt=\"\" class=\"wp-image-861\"\/><\/figure>\n\n\n\n<p>\u300c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u300d\u3092\u30af\u30ea\u30c3\u30af\u306e\u5f8c\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u4e2d\u306e\u753b\u9762\u306b\u9077\u79fb\u3057\u307e\u3059\u304c\u305d\u306e\u307e\u307e\u653e\u3063\u3066\u304a\u3044\u3066\u3001\u30ed\u30fc\u30ab\u30ebPC\uff08\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u623b\u308a\u307e\u3059\u3002Web\u30b5\u30a4\u30c8\u53c8\u306fWeb\u30a2\u30d7\u30ea\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3060\u3051\u3067\u3042\u308c\u3070\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u304c\u5b8c\u4e86\u5f8c\u306b\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u9589\u3058\u3066\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002\u4ed6\u65b9Firebase\u306e\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u6a5f\u80fd\u3092Web\u30a2\u30d7\u30ea\u306b\u5b9f\u88c5\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u3053\u306e\u6bb5\u968e\u3067\u3059\u3050\u306b\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3053\u3068\u306f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u5f8c\u8ff0\u300cFirebase\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u3067\u306e\u30a2\u30d7\u30ea\u306e\u767b\u9332\u65b9\u6cd5\u300d\u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"wp-block-snow-monkey-blocks-information smb-information\" data-label-align=\"left\" data-label-vertical-align=\"top\"><div class=\"smb-information__body\">\n<div class=\"wp-block-snow-monkey-blocks-information-item smb-information__item\"><div class=\"c-row\"><div class=\"c-row__col c-row__col--1-1 c-row__col--md-1-4\"><div class=\"smb-information__item__label\"><strong>Firebase\u306b\u304a\u3051\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3068\u306f<\/strong><\/div><\/div><div class=\"c-row__col c-row__col--1-1 c-row__col--md-3-4\"><div class=\"smb-information__item__body\">\n<pre class=\"wp-block-preformatted\">Firebase\u306b\u304a\u3051\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u30a2\u30d7\u30ea\u306e\u4e0a\u4f4d\u6982\u5ff5\u3067\u3001\u5177\u4f53\u7684\u306a\u30a2\u30d7\u30ea\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5185\u5074\u306b\u4f5c\u6210\uff08\u767b\u9332\uff09\u3057\u307e\u3059\u3002\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3060\u3051\u306a\u3089\u30a2\u30d7\u30ea\u306e\u767b\u9332\u306f\u4e0d\u8981\u3067\u3059\u304c\u3001\u524d\u8ff0\u306eFirebase\u5185\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff08Could FireStore\uff09\u3001\u8a8d\u8a3c\u6a5f\u80fd\uff08Firebase Authentication\uff09\u7b49\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u30a2\u30d7\u30ea\u306e\u767b\u9332\u3092\u8981\u3057\u307e\u3059\u3002\u3053\u306e\u4e21\u8005\u306e\u95a2\u4fc2\u306f\u3084\u3084\u308f\u304b\u308a\u306b\u304f\u3044\u306e\u3067\u3059\u304c\u3001Firebase\u3067\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u306fGoogle Cloud Project\u4e0a\u3067\u5834\u6240\u3092\u78ba\u4fdd\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3042\u308a\u3001Firebase\u306b\u56fa\u6709\u306e\u6a5f\u80fd\u3092\u4f7f\u3046\u306b\u306f\u5225\u9014Firebase\u4e0a\u3067\u306e\u8a2d\u5b9a\u3092\u8981\u3059\u308b\u3068\u8003\u3048\u308b\u3068\u308f\u304b\u308a\u3084\u3059\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093<\/pre>\n<\/div><\/div><\/div><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Firebase\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u3067\u306e\u30a2\u30d7\u30ea\u306e\u767b\u9332\u65b9\u6cd5<\/h2>\n\n\n\n<p>\u4ee5\u4e0a\u3067\u30c7\u30d7\u30ed\u30a4\u306f\u53ef\u80fd\u3067\u3059\u304c\u3001\u6700\u5f8c\u306b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u3067Firebase\u30a2\u30d7\u30ea\u3092\u767b\u9332\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002Firebase\u306b\u304a\u3051\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3068\u30a2\u30d7\u30ea\u306e\u9055\u3044\u306f\u524d\u8ff0\u306e\u901a\u308a\u3067\u3059\u3002Firebase\u306e\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306b\u623b\u308a\u3001\u53f3\u4e0a\u306eGo to Console\u3092\u62bc\u3059\u3068\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u8868\u793a\u3055\u308c\u308b\u753b\u9762\u306b\u79fb\u308a\u307e\u3059\u306e\u3067\u3001\u540c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u90e8\u5206\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/02\/image-16-1024x602.png\" alt=\"\" class=\"wp-image-1351\"\/><\/figure>\n\n\n\n<p><br><br>\u7d9a\u3044\u3066\u3001\u5de6\u4e0a\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u6982\u8981\u306e\u53f3\u5074\u306b\u6b6f\u8eca\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u300c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u8a2d\u5b9a\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/02\/image-17.png\" alt=\"\" class=\"wp-image-1353\"\/><\/figure>\n\n\n\n<p><br><br>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u3068\u3044\u3046\u753b\u9762\u304c\u958b\u304f\u306e\u3067\u3001\u4e0b\u6bb5\u30de\u30a4\u30a2\u30d7\u30ea\u306e\u4e2d\u306b\u3042\u308b\u30b3\u30fc\u30c9\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/02\/image-18-1024x799.png\" alt=\"\" class=\"wp-image-1356\"\/><\/figure>\n\n\n\n<p><br><br>\u7d9a\u304f\u30a2\u30d7\u30ea\u306e\u767b\u9332\u753b\u9762\u3067\u306f\u3001\u30a2\u30d7\u30ea\u540d\u3092\u5165\u529b\u3001\u300cFirebase Hosting\u300d\u3082\u300c\u8a2d\u5b9a\u3057\u307e\u3059\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3057\u3001\u300c\u30a2\u30d7\u30ea\u3092\u767b\u9332\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/02\/image-19.png\" alt=\"\" class=\"wp-image-1359\"\/><\/figure>\n\n\n\n<p><br><br>\u6b21\u306e\u90e8\u5206\u3067script\u30bf\u30b0\u3092\u5f35\u308b\u3088\u3046\u8981\u8acb\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u3053\u306e\u5de5\u7a0b\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u300c\u6b21\u3078\u300d\u3092\u62bc\u3057\u307e\u3059\uff08\u5f8c\u304b\u3089\u3067\u304d\u307e\u3059\uff09\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/02\/image-20.png\" alt=\"\" class=\"wp-image-1362\"\/><\/figure>\n\n\n\n<p><br><br>\u6b21\u306e\u753b\u9762\u3067\u306fCLI\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3088\u3046\u6c42\u3081\u308c\u307e\u3059\u304c\u3001\u3053\u306e\u8a18\u4e8b\u306e\u5192\u982d\u3067\u3054\u7d39\u4ecb\u3057\u305f\u901a\u308a\u3067\u6e08\u3093\u3067\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u3053\u3067\u3082\u4f55\u3082\u305b\u305a\u306b\u300c\u6b21\u3078\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/02\/image-21.png\" alt=\"\" class=\"wp-image-1368\"\/><\/figure>\n\n\n\n<p><br><br>\u7d9a\u304f\u753b\u9762\u3067\u306f\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067firebase\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u304c\u7c21\u5358\u306b\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u306e\u5de5\u7a0b\u306f\u524d\u8ff0\u306e\u901a\u308a\u8a73\u3057\u304f\u89e3\u8aac\u3092\u3044\u305f\u3057\u307e\u3057\u305f\u306e\u3067\u3001\u300c\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u9032\u3080\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/yoheiko.com\/wp-content\/uploads\/2021\/02\/image-22.png\" alt=\"\" class=\"wp-image-1370\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">SDK \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066 Firebase \u3092\u521d\u671f\u5316\u3059\u308b<\/h2>\n\n\n\n<p>npm \u3092\u4f7f\u7528\u3057\u3066 Firebase \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>npm install firebase<\/code><\/pre><\/div>\n\n\n\n<p>Firebase \u30a2\u30d7\u30ea\u306f\u30b3\u30f3\u30c6\u30ca\u306b\u4f3c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3001\u4e00\u822c\u7684\u306a\u69cb\u6210\u3092\u4fdd\u5b58\u3057\u3001Firebase \u30b5\u30fc\u30d3\u30b9\u5168\u4f53\u3067\u8a8d\u8a3c\u3092\u5171\u6709\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">collection<\/h2>\n\n\n\n<p>collection\u306b\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<div class=\"wp-block-jin-gb-block-icon-box jin-icon-comment jin-iconbox\"><div class=\"jin-iconbox-icons\"><i class=\"jic jin-ifont-comment jin-icons\"><\/i><\/div><div class=\"jin-iconbox-main\">\n<p>document:\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e\u4e2d\u306b\u4fdd\u5b58\u3055\u308c\u308b\u3002JSON\u306b\u4f3c\u305f\u69cb\u9020\u306e\u30c7\u30fc\u30bf<\/p>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u4f5c\u6210\u3068\u66f4\u65b0(setDoc)<\/h3>\n\n\n\n<p>setDoc\u95a2\u6570\u3067\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u5229\u7528\u3059\u308b\u3002<br>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8ID\u3092\u6307\u5b9a\u3057\u3066\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u6307\u5b9a\u3057\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u540d\u304cFireStore\u306b\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306f\u6307\u5b9a\u3057\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u540d\u3067\u65b0\u305f\u306a\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3002\u3059\u3067\u306b\u3042\u308c\u3070\u30c7\u30fc\u30bf\u306f\u4e0a\u66f8\u304d\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<p>\u203b\u57fa\u672c\u7684\u306b\u306f\u5fc5\u8981\u306a\u3068\u304d\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u540d\u6307\u5b9a\u3067\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u4ee5\u5916\u306f\u6b21\u9805\u3067\u8aac\u660e\u3059\u308b\u30e9\u30f3\u30c0\u30e0ID\u3067\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30e9\u30f3\u30c0\u30e0\u306aID\u304c\u4ed8\u4e0e\u3055\u308c\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u4f5c\u6210(addDoc)<\/h3>\n\n\n\n<p>addDoc\u95a2\u6570\u3067\u306f\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u5229\u7528\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u4e0b\u8a18\u306e\u4f8b\u306e\u901a\u308a\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8ID\u3092\u6307\u5b9a\u3057\u306a\u3044\u306e\u3067\u3001FireStore\u304c\u81ea\u52d5\u7684\u306b\u4e00\u610f\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8ID\u3092\u5272\u308a\u632f\u3063\u3066\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3002<br>\u203b\u57fa\u672c\u7684\u306b\u30e9\u30f3\u30c0\u30e0\u306aID\u3067\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4f5c\u308a\u3001\u5fc5\u8981\u306a\u6642\u306e\u307f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8ID\u3092\u6307\u5b9a\u3057\u3066\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<div class=\"wp-block-jin-gb-block-icon-box jin-icon-comment jin-iconbox\"><div class=\"jin-iconbox-icons\"><i class=\"jic jin-ifont-comment jin-icons\"><\/i><\/div><div class=\"jin-iconbox-main\">\n<p>\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9:\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3084\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u304cFirestore\u306e\u3069\u3053\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3092\u793a\u3059\u30d1\u30b9<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u53c2\u7167\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n\n\n\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3001\u307e\u305f\u306f\u524a\u9664\u3057\u305f\u308a\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u307e\u305f\u306f\u66f4\u65b0\u3057\u305f\u308a\u3059\u308b\u306b\u306f\u3001\u64cd\u4f5c\u3092\u884c\u3046\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u53c2\u7167\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u30d1\u30b9\u3092 2 \u756a\u76ee\u306e\u5f15\u6570\u3068\u3057\u3066\u6e21\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>const spaceRef = ref(storage, &#39;images\/space.jpg&#39;);<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u6587\u5b57\u5217\u304b\u3089\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b<\/h3>\n\n\n\n<p><code>Blob<\/code>\u3001<code>File<\/code>\u3001\u307e\u305f\u306f&nbsp;<code>Uint8Array<\/code>&nbsp;\u3092\u4f7f\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001<code>uploadString()<\/code>&nbsp;\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066 raw\u3001<code>base64<\/code>\u3001<code>base64url<\/code>\u3001\u307e\u305f\u306f&nbsp;<code>data_url<\/code>&nbsp;\u30a8\u30f3\u30b3\u30fc\u30c9\u6587\u5b57\u5217\u3092 Cloud Storage \u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>\/\/ Data URL string\nconst message4 = &#39;data:text\/plain;base64,5b6p5Y+344GX44G+44GX44Gf77yB44GK44KB44Gn44Go44GG77yB&#39;;\nuploadString(storageRef, message4, &#39;data_url&#39;).then((snapshot) =&gt; {\n  console.log(&#39;Uploaded a data_url string!&#39;);\n});<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Firebase\u306fGoogle\u304c\u63d0\u4f9b\u3059\u308b\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002\u30af\u30e9\u30a6\u30c9\u74b0\u5883\u306b\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u3069\u3092\u8a2d\u7f6e\u3057\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u305d\u308c\u3089\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u30b5\u30fc\u30d0\u30fc\u5074\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u306a\u3069\u3092\u7528\u610f\u3059\u308b\u5fc5\u8981<\/p>\n","protected":false},"author":1,"featured_media":1775,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[45],"tags":[],"class_list":["post-1748","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-45"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1748"}],"version-history":[{"count":6,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1748\/revisions"}],"predecessor-version":[{"id":2406,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1748\/revisions\/2406"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/media\/1775"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}