override waitress file_wrapper

This commit is contained in:
cwilvx
2025-03-08 15:17:59 +03:00
parent 18f929d6f7
commit 26c4c599d5
+3
View File
@@ -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"}