Answer the question
In order to leave comments, you need to log in
TypeError at /image/ post() missing 1 required positional argument: 'filename' in django rest?
I send an image via api and receive it using this view:
class ImageProfile(APIView):
parser_classes = [FileUploadParser]
def post(self, request, filename, format=None):
image = request.data['file']
ImageProfile.objects.create(image=image)
return Response(status=200)
POST /image/ HTTP/1.1
Host: 127.0.0.1:8000
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
cache-control: no-cache
Postman-Token: fcf56493-cdf1-4a23-a863-03dacb5a59ad
Content-Disposition: form-data; name="file"; filename="C:\Users\Marsel\Pictures\1_grunt.png
Answer the question
In order to leave comments, you need to log in
Imagine that there are 10 entries in the array - what will happen when the (pre)last iteration is performed?
$rows[$i+1]
$rows[$i+2]
A club of wangers gathered sharply here, and we will guess what error it writes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question