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