title: Open url in QuickLook framework
body: <p>I am trying to open a file using the QuickLook framework.  All the resources I am finding online show how to open a file stored locally with quicklook, however, is it possible to open a file using a url link (which is not stored locally)?</p>
  
  <p>In my attempts, I have failed.  Here is what I've done:</p>
  
  <pre><code>func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      let file = fetchedResultsController.object(at: indexPath)
  
      var fileToPreviewURL = "https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider1.jpg"
  
      let urlToCheck = NSURL(string: fileToPreviewURL)
  
      if QLPreviewController.canPreview(urlToCheck) {
          print("Can preview!")
          quickLookController.currentPreviewItemIndex = 0
          navigationController?.pushViewController(quickLookController, animated: true)
      }else{
          print("Cannot preview") //printing out this in console when run app
      }
  
  }
  </code></pre>
  
  <p>And my delegate methods:</p>
  
  <pre><code>extension TaskViewVC:  QLPreviewControllerDataSource {
  
      func numberOfPreviewItems(in controller: QLPreviewController) -&gt; Int {
          return 1
      }
  
      func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -&gt; QLPreviewItem {
  
          let url = NSURL(string: "https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider1.jpg")
  
          return url!
      }
  }
  </code></pre>
  
  <p>I'm not sure why it QLPreviewController cannot preview the urlToCheck, which is a completely valid URL with an image.</p>