title: Issue with getting thumbnail from videos in documents
body: <p>I am trying to generating thumbnail from video files which stored in documents directory. First I am collecting only video files with <code>mp4</code> formats :</p>
  
  <pre><code> override func viewWillAppear(_ animated: Bool) {
  
          let VIDEO = [collect(files: "mp4"),
                       collect(files: "MP4")]
          videoArray = Array(VIDEO.joined())
  
      }
  
  
   func collect(files:String) -&gt; [String] {
  
          var fileExtentions = [String]()
  
          let documentsUrl =  FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
  
          let fileManager = FileManager.default
          let keys = [URLResourceKey.isDirectoryKey, URLResourceKey.localizedNameKey]
          let options: FileManager.DirectoryEnumerationOptions = [.skipsPackageDescendants, .skipsSubdirectoryDescendants, .skipsHiddenFiles]
  
          let enumerator = fileManager.enumerator(
              at: documentsUrl,
              includingPropertiesForKeys: keys,
              options: options,
              errorHandler: {(url, error) -&gt; Bool in
                  return true
          })
  
  
          if enumerator != nil {
              while let file = enumerator!.nextObject() {
                  let path = URL(fileURLWithPath: (file as! URL).absoluteString, relativeTo: documentsUrl).path
                  if path.hasSuffix(files){
                      fileExtentions.append(path)
                  }
              }
          }
  
  
          return fileExtentions
      }
  </code></pre>
  
  <p>Then fill tableview's data like this :</p>
  
  <pre><code> func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
          let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! VideoCell
  
          let files = videoArray[indexPath.row]
          let fileURL = URL(fileURLWithPath: files)
  
          //Vido Title
          cell.videoTitle.text = fileURL.lastPathComponent.removingPercentEncoding!
  
  
          cell.thumbnail.image = getThumbnailFrom(path:fileURL)
  
          return cell
      }
  </code></pre>
  
  <p>I am generating thumbnail from videos like this :</p>
  
  <pre><code>  func getThumbnailFrom(path: URL) -&gt; UIImage? {
  
          do {
  
              let asset = AVURLAsset(url: path , options: nil)
              let imgGenerator = AVAssetImageGenerator(asset: asset)
              imgGenerator.appliesPreferredTrackTransform = true
              let cgImage = try imgGenerator.copyCGImage(at: CMTimeMake(0, 5), actualTime: nil)
              let thumbnail = UIImage(cgImage: cgImage)
  
              return thumbnail
  
          } catch let error {
  
              print("*** Error generating thumbnail: \(error.localizedDescription)")
              return nil
  
          }
  
      }
  </code></pre>
  
  <p>But finally when run the app , compiler gives me this error :</p>
  
  <blockquote>
    <p>*** Error generating thumbnail: The requested URL was not found on this server.</p>
  </blockquote>