In postmen I send data like this:
My python code is:
headers = {
"Accept": "*/*",
"Content-Type": "multipart/form-data; boundary=974767299852498929531610575",
}
response = requests.request(
"POST",
LINK,
headers=headers,
data={
'product_id': 1,
'product_images': [file, ]
}
)
Where file has InMemoryUploadedFile format. But I’ve got error.
Also I’ve tried
file = my_file.file.getvalue()
But still the error. How can I fix my cod and get 200 status? Any ideas?