Werkzeug 2.0 has a send_file method that Flask's send_file wraps.
One of its parameters is environ and its description is "(WSGIEnvironment) - The WSGI environ for the current request."
Where do I get this value to pass in my code?
from flask import Flask, request
from werkzeug.utils import send_file
app = Flask(__name__)
@app.route("/download/<string:filename>")
def download(filename):
return send_file(filename, environ=...)