diff --git a/app/api/stream.py b/app/api/stream.py index c5e759bd..c8518d3a 100644 --- a/app/api/stream.py +++ b/app/api/stream.py @@ -11,6 +11,8 @@ from typing import Literal from flask import send_file, request, Response, send_from_directory from flask_openapi3 import APIBlueprint, Tag from pydantic import BaseModel, Field +import werkzeug +import werkzeug.wsgi from app.api.apischemas import TrackHashSchema from app.lib.trackslib import get_silence_paddings from app.lib.transcoder import start_transcoding @@ -59,6 +61,7 @@ def send_track_file_legacy(path: TrackHashSchema, query: SendTrackFileQuery): NOTE: Does not support range requests or transcoding. """ + request.environ["wsgi.file_wrapper"] = werkzeug.wsgi.FileWrapper trackhash = path.trackhash filepath = query.filepath msg = {"msg": "File Not Found"}