title: Get the Data of assets-library://asset/asset.MOV
body: <p>I am accessing the videos of my device <strong>photoLibrary</strong>. Everythig is working great. Now I have a video url, I wants to get the data of video so that I can upload to server via REST API, but failed to get the data of video. Getting following error -<br>
  <code>Error Domain=NSCocoaErrorDomain Code=256 "The file “asset.MOV” couldn’t be opened." UserInfo={NSURL=assets-library://asset/asset.MOV?id=52C33235-2BFE-4FA4-AC8C-5E48DC566847&amp;ext=MOV}</code></p>
  
  <p><strong>ImagePickerController code is as follows -</strong></p>
  
  <pre><code>    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any])
          {            
           if let image = info[UIImagePickerControllerEditedImage] as? UIImage {// Get the Image    
            }
          else if let videoURL1 = info["UIImagePickerControllerReferenceURL"] as? URL
              {
           self.videoURL = videoURL1
              }            
           picker.dismiss(animated: true, completion: nil)
          }
  
  func imagePickerControllerDidCancel(_ picker: UIImagePickerController)
         {
         picker.dismiss(animated: true, completion: nil)
         }
  </code></pre>
  
  <p><strong>My code to get the data is as follows -</strong> </p>
  
  <pre><code>            do
              {
           let data = try Data(contentsOf: self.videoURL.absoluteURL, options: .alwaysMapped)
                  print(data)
              }
              catch
              {
                  print(error)
              }
  
              do
              {
         let data = try Data(contentsOf: self.videoURL.absoluteURL)
               }
              catch
              {
                  print(error)
              }
  </code></pre>