title: I can't understand why posts are not loading in firebase
body: <p>firebase does not write, although it seems to be syntactically correct. The application compiles, but no writes take place.</p>
  <p>The documentation also seems to be correct.</p>
  <p>the logic is simple. The user uploads a file from the phone, the file is sent to the repository</p>
  <pre><code>    @IBAction func addButtonTouchUpInside(_ sender: Any) {
          ProgressHUD.show(&quot;Waiting...&quot;, interaction: false)
          if let profileImg = self.selectedImage, let imageData = image?.jpegData(compressionQuality: 0.4){
              let photoIdString = NSUUID().uuidString
              let storageRef = Storage.storage().reference(forURL: https://example.com).child(&quot;posts&quot;).child(photoIdString)
              storageRef.putData(imageData, metadata: nil, completion: {(metadata, error) in
                  if error != nil {
                      ProgressHUD.showError(error!.localizedDescription)
                      return
                  }
                  let photoUrl = storageRef.downloadURL(completion: {url, error in
                      if error != nil {
                          print(&quot;Failed to download url:&quot;, error!)
                          return
                      } else {
                          let url = url?.absoluteString
                          self.sendDataToDatabase(photoUrl: url!)
                      }
                  })
      })
          }
      }
                  
      func sendDataToDatabase(photoUrl: String){
          let ref = Database.database().reference()
          let postsReference = ref.child(&quot;posts&quot;)
          let newPostId = postsReference.childByAutoId().key
          let newPostReference = postsReference.child(newPostId!)
          newPostReference.setValue([&quot;photoUrl&quot;: photoUrl], withCompletionBlock: {
              (Error, ref) in
              if Error != nil {
                  ProgressHUD.showError(Error!.localizedDescription)
                  return
              }
              ProgressHUD.showSuccess(&quot;Success&quot;)
          })
      }
  }
  extension PerformViewController: UIImagePickerControllerDelegate, UINavigationControllerDelegate{
      func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]){
          print(&quot;Did finish picking media&quot;)
          if let image = info[UIImagePickerController.InfoKey.originalImage ] as? UIImage{
              selectedImage = image
              photo.image = image
          }
          
          dismiss(animated: true, completion: nil)
      }
  }
  </code></pre>