ios – Cannot add Video File to Firebase Storage error -13000

Im attempting to add video File to FirebaseStorage. These are my strategies:

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo information: [UIImagePickerController.InfoKey : Any]) {
        if let url = information[UIImagePickerController.InfoKey.mediaURL] as? URL{
            print("THIS IS URL =====")
            uploadToCloud(fileURL: url)
        picker.dismiss(animated: true)
    func uploadToCloud(fileURL: URL){
        let storage =
        let knowledge = Information()
        let storageRef = storage.reference()
        let localFile = fileURL
        let videoRef = storageRef.youngster("UploadVideoOne")
        let uploadTask = videoRef.putFile(from: localFile, metadata: nil) { metadata, err in
            guard let meatadata = metadata else{
            print("video UPLOADED ")

And that i hold getting error:

Elective(Error Area=FIRStorageErrorDomain Code=-13000 “An unknown error occurred, please examine the server response.” UserInfo={, NSURLErrorFailingURLSessionTaskErrorKey=BackgroundUploadTask .<1>, object=UploadVideoOne, NSURLErrorRelatedURLSessionTaskErrorKey=(
“BackgroundUploadTask .<1>”
), NSLocalizedDescription=An unknown error occurred, please examine the server response., ResponseErrorDomain=NSURLErrorDomain, NSErrorFailingURLStringKey=
-OUhLoL17E2qEvyJQNupT8ZdSwhZTr6Xa2HTW9W0viSesINjvcJaVn8y8vmWwZBjHgMXk7&upload_protocol=resumable, NSErrorFailingURLKey=
-OUhLoL17E2qEvyJQNupT8ZdSwhZTr6Xa2HTW9W0viSesINjvcJaVn8y8vmWwZBjHgMXk7&upload_protocol=resumable, ResponseErrorCode=-1})

Once I change simply infoKey to .imageURL – importing picture works simply wonderful

Leave a Reply