ios - 从存储中删除文件夹后 Firebase 不上传文件

标签 ios swift firebase firebase-storage

我最近超出了我的 firebase 存储空间,因此它停止工作了。为了解决这个问题,我通过完全删除从控制台单击存储按钮时出现的第一个文件夹,从存储中删除了所有文件。令人惊讶的是,当再次尝试从我的应用程序加载视频文件时,它不再有效,而是显示以下错误。 我怀疑这与无法找到引用文献有关。 我的问题是我该如何解决这个问题。在我的应用程序中,我正在使用 .putFile 直接上传到 Storage.storage().reference()。如果这不是正确的引用,我该如何创建一个新的?

这就是我尝试将视频上传到我的存储空间的方式:

let USER_STORAGE = Storage.storage().reference()

/// Uploads a video to database using the URL
    private func uploadVideoToDatabase(videoURL: URL, completion: @escaping (Bool)->Void){
        let filename = videoURL.absoluteString
        USER_STORAGE.child(filename).putFile(from: videoURL, metadata: nil){(metadata, error) in
            if error != nil {
                completion(false)
            } else {
                completion(true)
            }
        }
    }

video could not be uploaded at this time Error Domain=FIRStorageErrorDomain Code=-13000 "An unknown error occurred, please check the server response." UserInfo={object=file:/private/var/mobile/Containers/Data/Application/ ... more stuff...NSLocalizedDescription=An unknown error occurred, please check the server response., ResponseErrorDomain=NSURLErrorDomain, NSErrorFailingURLStringKey=https://firebasestorage.googleapis.com

最佳答案

Firebase 存储不仅对存储的数据量有限制。存储的 GB、下载的 GB、上传操作和下载操作都有限制。我怀疑您每天的下载量超过 1 GB。您可以在此处查看更多限制 https://firebase.google.com/pricing/

关于ios - 从存储中删除文件夹后 Firebase 不上传文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48356203/

相关文章:

swift - 尽管提供了 Twitter Api,但回调 URL 未获批准

iphone - 隐藏和显示间歇性 uilabel 和 uinavigation 标题?

ios - 如何在 iOS 上检索 Facebook id

ios - 在不访问主线程的情况下保存 NSManagedObjectContext

ios - Swift 中的本地化 - 即使应用程序有多种语言,也将应用程序限制为一种语言

ios - 向字典数组添加数据

ios - Parse中如何在同一行同时添加多条数据

javascript - Firebase JavaScript : Securely store a password inside the database

ios - 安装 firebase 后生成推送通知

django - 从 FileField 中的 django 模型将图像上传到 Firebase 存储