From 1a19abe4dbf23cd9436e66ac2726aa8e0fe7ef8d Mon Sep 17 00:00:00 2001 From: Mike0001-droid Date: Wed, 5 Jun 2024 18:35:07 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D1=83=20=D1=81=D0=B5?= =?UTF-8?q?=D1=80=D0=B8=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/proj/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/proj/api/views.py b/server/proj/api/views.py index 6f56be2..1754eb0 100644 --- a/server/proj/api/views.py +++ b/server/proj/api/views.py @@ -24,7 +24,7 @@ class FetchAndServeFile(ViewSet): # Create a response with the appropriate content type and headers file_response = HttpResponse(response.content, content_type='audio/mpeg') file_response['Content-Disposition'] = 'attachment; filename="output.mp3"' - return Response(file_response, status=status.HTTP_200_OK) + return Response(f"{file_response}", status=status.HTTP_200_OK) except requests.RequestException as e: return Response({'error': str(e)}, status=status.HTTP_400_BAD_REQUEST)