title: How to send video file to firebase storage in ios
body: <p>I am working on a Video sharing iOS app and using <code>Firebase5</code> as backend. It allow User can choose video and send it to storage. When  I tried the video cannot push to <code>database</code> server. Below is my code:</p>
  
  <pre><code>static func uploadVideoToFirebaseStorage(videoUrl: URL, onSuccess: @escaping (_ videoUrl: String) -&gt; Void) {
      let videoIdString = NSUUID().uuidString
      //Config.STORAGE_ROOT_REF is var STORAGE_ROOT_REF = "gs://****-cdc3c.appspot.com"
      let storageRef = Storage.storage().reference(forURL: Config.STORAGE_ROOT_REF).child("posts").child(videoIdString)
      storageRef.putFile(from: videoUrl, metadata: nil) { (metadata, error) in
          if error != nil {
              ProgressHUD.showError(error!.localizedDescription)
              return
          }
      }
      storageRef.downloadURL(completion: { (url, error) in
          if let error = error {
              return
          }else {
              let videoUrl = url!.absoluteString
              onSuccess(videoUrl)
          }
      })
  }      
  </code></pre>