From f993415cc8d02c1b22574db3538ae1a64bf5164a Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Tue, 24 Sep 2024 15:29:40 +0000 Subject: [PATCH] added application json and text/plain as allowed mime --- breathecode/media/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/breathecode/media/views.py b/breathecode/media/views.py index e78482fb1..d237d2ff7 100644 --- a/breathecode/media/views.py +++ b/breathecode/media/views.py @@ -7,6 +7,7 @@ import requests from adrf.views import APIView from adrf.viewsets import ViewSet +from capyc.rest_framework.exceptions import ValidationException from circuitbreaker import CircuitBreakerError from django.db.models import Q from django.http import StreamingHttpResponse @@ -35,7 +36,6 @@ from breathecode.utils.decorators import has_permission from breathecode.utils.decorators.capable_of import acapable_of from breathecode.utils.i18n import translation -from capyc.rest_framework.exceptions import ValidationException logger = logging.getLogger(__name__) MIME_ALLOWED = [ @@ -47,6 +47,8 @@ "video/mp4", "audio/mpeg", "application/pdf", + "application/json", + "text/plain", "image/jpg", "application/octet-stream", "application/x-pka",