英文:
Counting the number of files stored in Firebase Storage will count as a Storage Operation?
问题
我想知道以下代码片段是否会被视为 Firebase 存储操作,可能会影响有关 FireBase Pricing 计划的费用?
Future<void> countFiles() async {
// 创建引用
var storageReference = FirebaseStorage.instance.ref().child("<directory-name>");
// 计算文件数量
var fileList = await storageReference.listAll();
setState(() {
_fileCount = fileList.items.length;
});
}
[1]: https://firebase.google.com/pricing
英文:
I'm wondering if the following code snippet will count as a Firebase Storage operation which could affect the costs regarding the FireBase Pricing plan?
Future<void> countFiles() async {
// Create a reference
var storageReference = FirebaseStorage.instance.ref().child("<directory-name>");
// Count the amount of files
var fileList = await storageReference.listAll();
setState(() {
_fileCount = fileList.items.length;
});
答案1
得分: 1
是的,列出对象是一个需要计费的操作。您可以参考Google Cloud文档了解以下详细信息:
当操作应用于一个存储桶,例如列出存储桶中的对象时,该存储桶设置的默认存储类确定操作的费用。
英文:
Yes, listing objects is a billable operation. You will want to consult the Google Cloud documentation for details that:
> When an operation applies to a bucket, such as listing the objects in a bucket, the default storage class set for that bucket determines the operation cost.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论