FIRStorageErrorDomain Code=-13010

2019-07-13 15:45发布

问题:

I get an unfilled UIImageView with this error in Console

"Object images does not exist."

Here is the code:

 // download image
    let gsReference = Storage.storage().reference(forURL: "gs://myaddress.appspot.com/post-pics/")
        let imageStorageRef = storageRef.child("images/")
        imageStorageRef.getData(maxSize: 2 * 1024 * 1024) { data, error in
            if let error = error {
                print("******** \(error)")
            } else {

                    let image = UIImage(data: data!)

                }
            }

回答1:

Your Reference to the download is incorrect. Check your current StorageRef url path, or ImageStorageRef. Make sure its something like this:

let gsReference = Storage.storage().reference().child(auth.auth().currentUser.uid).child("post-pics")