コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Cloud Storage for Firebase
plat_ios
plat_android
plat_web
plat_flutter
plat_cpp
plat_unity
Cloud Storage for Firebase は、写真や動画などのユーザー作成コンテンツを保存、提供する必要があるアプリ デベロッパー向けのソリューションで、高速で安全な Google Cloud インフラストラクチャ上に構築されています。
Cloud Storage for Firebase は、Google の規模をもとに構築された、強力かつシンプルでコスト効果の高いオブジェクト ストレージ サービスです。
Cloud Storage 用の
Firebase SDK を使用すると、ネットワーク品質にかかわらず、Firebase アプリでのファイルのアップロードとダウンロードに Google のセキュリティが適用されます。
このクライアント SDK は、画像、音声、動画、またはその他のユーザーが生成したコンテンツを格納する場合に使用できます。サーバーでは、Firebase Admin SDK を使用してバケットを管理し、ダウンロード URL を作成できます。また、Google Cloud Storage API を使用してファイルにアクセスできます。
準備ができたらプラットフォームを選択します。
iOS+
Android
ウェブ
Flutter
Unity
C++
主な機能
堅牢なオペレーション |
Cloud Storage 用の Firebase は、ネットワークの品質にかかわらずアップロードとダウンロードを行います。アップロードとダウンロードは堅牢性に優れていて、処理が停止されたところから再開されるため、時間と帯域幅を節約できます。
|
強固なセキュリティ |
Cloud Storage 用の Firebase SDK と Firebase Authentication の統合により、デベロッパーはシンプルで直感的な認証を利用できます。Google の宣言型セキュリティ モデルを使用して、ファイル名、サイズ、コンテンツ タイプ、その他のメタデータに基づいてアクセスを許可できます。
|
高いスケーラビリティ |
Cloud Storage は、アプリの急激な拡大を考慮して、エクサバイト規模に対応できるよう構築されています。
Spotify や Google フォトと同じインフラストラクチャを使用して、プロトタイプから製品版へ簡単に移行できます。 |
仕組み
デベロッパーは Cloud Storage 用の Firebase SDK を使用して、クライアントから直接ファイルのアップロードとダウンロードを行います。ネットワーク接続がよくない場合、クライアントは動作が停止したところから再試行できるため、ユーザーは時間と帯域幅を節約できます。
Cloud Storage for Firebase はファイルを Google Cloud Storage バケットに保存して、Firebase と Google Cloud の両方からアクセスできるようにします。これにより、Cloud Storage 用の Firebase SDK 経由でモバイル クライアントから柔軟にファイルのアップロードとダウンロードを行うことができます。また、Google Cloud Storage API を使用して、画像のフィルタリングや動画のコード変換といったサーバー側の処理を行うこともできます。
Cloud Storage は自動的にスケーリングされるため、他のプロバイダに移行する必要はありません。Google Cloud との統合のメリットの詳細について確認してください。
Cloud Storage 用の Firebase SDK は、Firebase Authentication とシームレスに統合してユーザーを識別します。また、個々のファイルやファイル グループごとにアクセス制御を設定できる宣言型セキュリティ言語が用意されているため、必要に応じてファイルを公開したり非公開にしたりできます。
実装パス
|
Cloud Storage 用の Firebase SDK を統合します。 |
Gradle、CocoaPods、またはスクリプト インクルード経由でクライアントをすばやく統合します。 |
|
参照を作成する |
アップロード、ダウンロード、または削除するファイルのパス("images/mountains.png" など)への参照を作成します。
|
|
アップロードまたはダウンロードする |
メモリ内またはディスク上のネイティブ タイプにアップロードまたはダウンロードします。 |
|
ファイルを保護する |
Cloud Storage 用の Firebase Security Rules を使用してファイルを保護します。
|
|
(省略可)ダウンロード URL を作成して共有する |
Firebase Admin SDK を使用して、共有可能な URL を生成し、ユーザーがオブジェクトをダウンロードできるようにします。
|
その他の種類のデータを保存する方法
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-04 UTC。
[null,null,["最終更新日 2025-08-04 UTC。"],[],[],null,["Cloud Storage for Firebase \nplat_ios plat_android plat_web plat_flutter plat_cpp plat_unity \nCloud Storage for Firebase is built on fast and secure\nGoogle Cloud infrastructure for app developers who need to store and serve\nuser-generated content, such as photos or videos. \nCloud Storage for Firebase is a powerful, simple, and cost-effective object storage service built for Google scale. The Firebase SDKs for Cloud Storage add Google security to file uploads and downloads for your Firebase apps, regardless of network quality.\n\n\u003cbr /\u003e\n\nYou can use our client SDKs to store images, audio, video, or other\nuser-generated content. On the server, you can use the Firebase Admin SDK to\nmanage buckets and create download URLs, and use\n[Google Cloud Storage APIs](//cloud.google.com/storage/docs/reference/libraries)\nto access your files.\n\n\u003cbr /\u003e\n\nReady to get started? Choose your platform:\n\n[iOS+](/docs/storage/ios/start)\n[Android](/docs/storage/android/start)\n[Web](/docs/storage/web/start)\n[Flutter](/docs/storage/flutter/start)\n\n[Unity](/docs/storage/unity/start)\n[C++](/docs/storage/cpp/start)\n\nKey capabilities\n\n|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Robust operations | Firebase SDKs for Cloud Storage perform uploads and downloads regardless of network quality. Uploads and downloads are robust, meaning they restart where they stopped, saving your users time and bandwidth. |\n| Strong security | Firebase SDKs for Cloud Storage integrate with Firebase Authentication to provide simple and intuitive authentication for developers. You can use our declarative security model to allow access based on filename, size, content type, and other metadata. |\n| High scalability | Cloud Storage is built for exabyte scale when your app goes viral. Effortlessly grow from prototype to production using the same infrastructure that powers Spotify and Google Photos. |\n\nHow does it work?\n\nDevelopers use the Firebase SDKs for Cloud Storage to upload and download files\ndirectly from clients. If the network connection is poor, the client is able to\nretry the operation right where it left off, saving your users time and\nbandwidth.\n\nCloud Storage for Firebase stores your files in a\n[Google Cloud Storage](//cloud.google.com/storage) bucket,\nmaking them accessible through both Firebase and Google Cloud. This allows you\nthe flexibility to upload and download files from mobile clients via the\nFirebase SDKs for Cloud Storage. In addition, you can do server-side processing such\nas image filtering or video transcoding using the\n[Google Cloud Storage APIs](//cloud.google.com/storage/docs/reference/libraries).\nCloud Storage scales automatically, meaning that there's no need to\nmigrate to any other provider. Learn more about all the benefits of our\n[integration with Google Cloud](/docs/storage/gcp-integration).\n\nThe Firebase SDKs for Cloud Storage integrate seamlessly with\n[Firebase Authentication](/docs/auth) to identify users, and we provide a\n[declarative security language](/docs/storage/security) that lets you set\naccess controls on individual files or groups of files, so you can make files as\npublic or private as you want.\n\nImplementation path\n\n|---|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| | Integrate the Firebase SDKs for Cloud Storage. | Quickly include clients via Gradle, CocoaPods, or a script include. |\n| | Create a Reference | Reference the path to a file, such as \"images/mountains.png\", to upload, download, or delete it. |\n| | Upload or Download | Upload or download to native types in memory or on disk. |\n| | Secure your Files | Use [Firebase Security Rules for Cloud Storage](/docs/storage/security) to secure your files. |\n| | (Optional) Create and Share Download URLs | Use the [Firebase Admin SDK](/docs/storage/admin/start) to generate shareable URLs to let users download objects. |\n\nLooking to store other types of data?\n\n- [Cloud Firestore](/docs/firestore) is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud.\n- The [Firebase Realtime Database](/docs/database) stores JSON application data, like game state or chat messages, and synchronizes changes instantly across all connected devices. To learn more about the differences between database options, see [Choose a database: Cloud Firestore or Realtime Database](/docs/firestore/rtdb-vs-firestore).\n- [Firebase Remote Config](/docs/remote-config) stores developer-specified key-value pairs to change the behavior and appearance of your app without requiring users to download an update.\n- [Firebase Hosting](/docs/hosting) hosts the HTML, CSS, and JavaScript for your website as well as other developer-provided assets like graphics, fonts, and icons.\n\nNext steps\n\n- Upload your first file to Cloud Storage using our quickstarts for [iOS](https://github.com/firebase/quickstart-ios), [Android](https://github.com/firebase/quickstart-android), [Web](https://github.com/firebase/quickstart-js), [C++](https://github.com/firebase/quickstart-cpp), or [Unity](https://github.com/firebase/quickstart-unity).\n- Add Cloud Storage to your [Apple](/docs/storage/ios/start), [Android](/docs/storage/android/start), [Web](/docs/storage/web/start), [C++](/docs/storage/cpp/start) or [Unity](/docs/storage/unity/start) app.\n- Learn about how to secure your files using [Firebase Security Rules for Cloud Storage](/docs/storage/security).\n- Add powerful new features such as image recognition or speech to text by [integrating with Google Cloud](/docs/storage/gcp-integration)."]]