Parser for nested params in multipart file upload
from drf_nested_field_multipart import NestedMultipartParser
from rest_framework import viewsets
class YourViewSet(viewsets.ViewSet):
parser_classes = (NestedMultipartParser,)
To enable JSON and multipart
from drf_nested_field_multipart import NestedMultipartParser
from rest_framework.parsers import JSONParser
from rest_framework import viewsets
class YourViewSet(viewsets.ViewSet):
parser_classes = (JSONParser, NestedMultipartParser)
pip install drf-nested-field-multipart