gpt4 book ai didi

google-app-engine - Firebase Storage 在尝试上传图片时出现 StorageException

转载 作者:太空宇宙 更新时间:2023-11-03 15:31:04 25 4
gpt4 key购买 nike

我一直在尝试将图像上传到新的 firebase 存储服务。它正在抛出 StorageException

E/StorageException: StorageException has occurred. An unknown error occurred, please check the HTTP result code and inner exception for server response. Code: -13000 HttpResult: 400

E/StorageException: The server has terminated the upload session java.io.IOException: The server has terminated the upload session at com.google.firebase.storage.UploadTask.zzVi(Unknown Source) at com.google.firebase.storage.UploadTask.zzVh(Unknown Source) at com.google.firebase.storage.UploadTask.run(Unknown Source) at com.google.firebase.storage.StorageTask$5.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

最佳答案

在您的 Firebase 控制台中,转到左侧的存储选项卡。单击规则选项卡并将您的规则设置为公开。使用以下代码将其设置为公开。

service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write;
}
}
}

这对于测试目的很有用,但是,您应该使用验证用户来保护您的数据库连接。

关于google-app-engine - Firebase Storage 在尝试上传图片时出现 StorageException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37543022/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com