title: Sharing DocumentFile using FileProvider
body: <p>if I want to share <code>sourceFile</code> of type <code>File</code>, I use FileProvider with authorities. Snippet:</p>
  
  <pre><code>val intent = Intent(Intent.ACTION_SEND)
  intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
  intent.putExtra(
      Intent.EXTRA_STREAM, FileProvider.getUriForFile(
          context,
          context.applicationContext.packageName + ".provider",
          sourceFile
      )
  )
  intent.type = "audio/ogg"
  startActivity(context, Intent.createChooser(intent, context.getString(R.string.share_audio)), null)
  </code></pre>
  
  <p>What is a proper way to do that if <code>sourceFile</code> is a <code>DocumentFile</code> instead of <code>File</code>?</p>
  
  <p>I couldn't fnd any sort of replacement for <code>getUriForFile</code> that works with <code>DocumentFile</code>. At the moment I just copy file to cache and then share it from there, but I guess there should be a better way.</p>