From 1bac65c096822fbb39b9b28d869c6cb764417c66 Mon Sep 17 00:00:00 2001 From: Mike0001-droid Date: Wed, 5 Jun 2024 18:30:30 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B5=D1=89=D0=B5=20=D1=80=D0=B0=D0=B7=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB=20=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B0=D1=82?= 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 22edfcb..6f56be2 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(f'{file_response['Content-Disposition']}', status=status.HTTP_200_OK) + return Response(file_response, status=status.HTTP_200_OK) except requests.RequestException as e: return Response({'error': str(e)}, status=status.HTTP_400_BAD_REQUEST)