Я предполагаю, что вы пишете представления на основе классов.
вот ваш view.py
class multipleFileUpload(APIView):
def post(self, request):
"""
:param request:
:return:
"""
try:
#this will read attributes other than file
str_value = request.POST["attributes"]
print(str_value)
#check if any file send in request if yes read all files one by one
if len(request.FILES) != 0:
for key in request.FILES:
file_obj = request.FILES[key]
print(file_obj.read()) #getting contents of the file in bytes
return JsonResponse({"res": "got files"})
except Exception as e:
print(str(e))
return JsonResponse({"res": "error"})
добавьте эту строку в ваш urls.py
url (r'uploadFiles / $ ', views.multipleFileUpload.as_view (), name =' uploadFiles '),
Запустите ваш постмен с тем же параметром и дайте мне знать.