简体   繁体   English

以编程方式创建Google Firebase存储桶Unity / C#?

[英]Create Google Firebase Storage Bucket Programmatically Unity / C#?

So I have been using the Unity Firebase Storage SDK for about a month and still can't figure out how to create a bucket from a Unity C# script if this is even possible? 因此,我已经使用Unity Firebase Storage SDK大约一个月了,即使有可能,我仍然不知道如何从Unity C#脚本创建存储桶? Is the only way to programmatically create a storage bucket is the gsutil command-line tool or one of the other google API libraries? 以编程方式创建存储桶的唯一方法是gsutil命令行工具还是其他Google API库之一? I can't find a solution for generating a bucket through a script like you can through the other google APIs like for python, PHP and node.js. 我找不到像通过其他Google API(例如python,PHP和node.js)那样通过脚本生成存储桶的解决方案。

I was thinking the Unity C# script would like some like this: 我当时在想Unity C#脚本想要这样的代码:

FirebaseStorage sotrageInstance = FirebaseStorage.DefaultInstance;

storageInstance.CreateBucket("My-Custom-Bucket-From-Unity");

None of the Firebase client libraries for mobile and web clients can create a new Cloud Storage bucket. 移动和Web客户端的Firebase客户端库均无法创建新的Cloud Storage存储桶。 That is a privileged operation and is reserved for only the CLI and backend libraries that are fully trusted. 这是一项特权操作,仅保留给完全信任的CLI和后端库。

If you really need to create a new bucket from a mobile client, you would probably have to create your own backend and call it from the client. 如果确实需要从移动客户端创建新存储桶,则可能必须创建自己的后端并从客户端调用它。 The server code could then call createBucket (nodejs) . 然后,服务器代码可以调用createBucket(nodejs) But you would definitely want to restrict very carefully who could do this under what circumstances. 但是您绝对希望非常谨慎地限制谁可以在何种情况下执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google Firebase和Unity(C#):无法从存储桶下载png - Google Firebase and Unity (C#): Unable to download png from bucket 如何从 C# 访问谷歌云存储桶 - How to access Google cloud storage bucket from c# 在 C# 中列出 Google Cloud Storage Bucket 中的嵌套文件夹 - List nested folders in Google Cloud Storage Bucket in C# 无法将图像文件上传到 Firebase 存储 - Unity C# - Unable to Upload Image file to Firebase Storage - Unity C# 将 .txt 文件从 Unity C# 上传到 Firebase 存储 - Uploading .txt files to firebase storage from Unity C# 如何在C#中以编程方式在Apache Drill的存储插件中创建连接 - How to create connection in storage plugin of Apache Drill Programmatically in c# Unity我如何使用firebase c#谷歌登录 - Unity how do i google sign in with firebase c# 在C#应用程序中创建默认Google Cloud Storage存储桶区域时进行更改 - Change default Google Cloud Storage bucket region when creating it in C# application 使用来自C#的Json文件中的服务帐户的Google云存储桶 - Google cloud storage bucket using service account in Json file from C# 使用RestSharp或C#从Google云存储桶中获取文件 - Get File from Google cloud storage bucket using RestSharp or C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM