使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
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 这种规模级别的应用。无论网络质量如何,
Firebase SDK for
Cloud Storage 都能为您的 Firebase 应用提供 Google 安全品质的文件上传和下载服务。
您可以使用我们的客户端 SDK 来存储图片、音频、视频或其他由用户生成的内容。在服务器上,您可以使用 Firebase Admin SDK 管理存储桶并创建下载网址,还可以使用 Google Cloud Storage API 访问您的文件。
准备好开始了吗?选择您的平台:
iOS+
Android
Web
Flutter
Unity
C++
主要功能
稳健的操作性 |
无论网络质量如何,Firebase SDK for Cloud Storage 都能执行上传和下载操作。上传和下载非常稳健,这意味着这些操作会从之前停止的地方重新开始,为您的用户节省时间和带宽。 |
可靠的安全性 |
Firebase SDK for Cloud Storage 与 Firebase Authentication 相集成,能够为开发者提供简单直观的身份验证解决方案。您可以使用我们的声明式安全模型,根据文件名、大小、内容类型和其他元数据来确定是否允许访问。
|
高可扩展性 |
Cloud Storage 经过专门设计,提供 EB 级的容量规模,即使应用人气暴增也可自如应对。它采用与 Spotify 和 Google 相册相同的基础架构,能够帮助您的应用轻松从原型扩容到正式版本。 |
工作原理
使用 Firebase SDK for Cloud Storage,开发者可以直接通过客户端上传和下载文件。如果网络连接较差,客户端可以在操作中止的地方重新尝试执行该操作,从而为您的用户节省时间和带宽。
Cloud Storage for Firebase 将您的文件存储在 Google Cloud Storage 存储桶中,以便您通过 Firebase 和 Google Cloud 访问这些文件。这样,您就可以灵活地通过 Firebase SDK for Cloud Storage 从移动客户端上传和下载文件。此外,您还可以使用 Google Cloud Storage API 执行服务器端处理,例如图片过滤或视频转码。Cloud Storage 会自动伸缩,这意味着您无需迁移到任何其他提供商。详细了解与 Google Cloud 集成的所有优势。
Firebase SDK for Cloud Storage 与 Firebase Authentication 无缝集成以识别用户,而且我们提供了一种声明式安全语言,让您可以针对单个文件或文件组设置访问权限控制,这样您就可以根据需要将文件设置为公开或不公开。
实现流程
想要存储其他类型的数据?
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-04。
[null,null,["最后更新时间 (UTC):2025-08-04。"],[],[],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)."]]