title: Serving media file to podcast.app (iOS/MacOS) for download
body: <p>I'm trying to create a simple podcast hosting web server with flask.</p>
  
  <p>Streaming media files from the server works beautifully. However whenever I try and download the media for offline viewing my podcast app throws "Download error".</p>
  
  <p>I've tried all sorts of headers and responses.</p>
  
  <p>End point I'm using with relevant code (I hardcoded the filename for testing):</p>
  
  <pre><code>import os
  import logging
  
  from streamlink.exceptions import (PluginError)
  from flask import Flask, redirect, abort, request
  from flask import send_from_directory
  
  def run_server(host, port, file_dir):
      @app.route('/media', methods=['GET'])
          def media():
              return send_from_directory(file_dir, '6TfLVL5GeE4.mp4')
  
      app.run(host=host, port=port, debug=True)
  </code></pre>
  
  <p>Podcast.app error log states:</p>
  
  <pre><code>Download failed due to error: Invalid asset: The original extension and resolved extension were not playable for episode url Optional(http://10.0.0.115:8084/media?id=6TfLVL5GeE4&amp;provider=tw).
  </code></pre>
  
  <p>I can't for the life of me figure why it would fail for downloading but stream perfectly fine.</p>
  
  <p>Please help!</p>