title: Swift: Having issues uploading videos to firebase
body: <p>I'm trying to upload video files from my ios app to firebase but I get this error message:</p>
  <p>2020-07-01 10:46:22.734237+0100 AppName[17646:835206] [core] &quot;Error returned from daemon: Error Domain=com.apple.accounts Code=7 (null)
  2020-07-01 10:46:28.031932+0100 AppName[17646:835206] Task &lt;568D30E0-41B3-4ADC-BC14-0E85365B1BAC&gt;.&lt;1&gt; finished with error [-1] Error Domain=NSURLErrorDomain Code=-1 &quot;unknown error&quot;
  NOT WORKING</p>
  <pre><code>func convertAssestsToImages() -&gt; Void {
      if selectedAssets.count != 0{
          for i in 0..&lt;selectedAssets.count{
              let manger = PHImageManager.default()
              let optionB = PHVideoRequestOptions()
              let db = Firestore.firestore()
              let pictureID = randomString(length: 12)
              let video_name = &quot;Video\(pictureID)&quot;
              let storageRef = Storage.storage().reference()
             
              optionB.isNetworkAccessAllowed = true
          
              manger.requestAVAsset(forVideo: selectedAssets[i], options: optionB) { (asset: AVAsset?, audioMix: AVAudioMix?, info: [AnyHashable : Any]?) -&gt; Void in
                  
                  if let urlAsset = asset as? AVURLAsset {
                      //***video upload***
                      let localVideoUrl: URL = urlAsset.url as URL
                      let storeVideo = storageRef.child(&quot;NAME1&quot;).child(SUB_NAME).child(video_name)
                      let metaData = StorageMetadata()
                      metaData.contentType = &quot;image/jpg&quot;
                      
                      storeVideo.putFile(from: localVideoUrl, metadata: metaData) { (metaData, error) in
                          if error != nil {
                              print(&quot;NOT WORKING&quot;)
                          }else{
                              print(&quot;WORKING&quot;)
                          }
                      }
                  }
              }
          }
      }
  }
  </code></pre>