diff --git a/finance/views.py b/finance/views.py index 2edd368..684b2f1 100644 --- a/finance/views.py +++ b/finance/views.py @@ -251,7 +251,7 @@ class YandexCheckView(APIView): }) logger_yandex.info(xml_res) - return Response(xml_res, status=200) + return HttpResponse(xml_res, content_type='application/xml') class YandexAvisoView(APIView): @@ -286,7 +286,7 @@ class YandexAvisoView(APIView): }) logger_yandex.info(xml_res) - return Response(xml_res, status=200) + return HttpResponse(xml_res, content_type='application/xml') class YandexFailView(APIView): diff --git a/storage/api.py b/storage/api.py index 1afcf62..f703f69 100644 --- a/storage/api.py +++ b/storage/api.py @@ -5,6 +5,7 @@ def upload_file(ext=None, original=None, name=None, base64=None, **_kwargs) -> F if original: new_file = File.objects.create(original=original) else: + ext = name.split('.')[1] if ext is None else ext new_file = File.objects.upload_as_base64(base64, ext) if name: