1

How do I make a PUT request for an imageField after getting the data from the database. I receive the data in the form of a URL "/media/img.png"

When I PUT the same data back, I get the error ["The submitted data was not a file. Check the encoding type on the form."]

What is the best way to PUT this data.

CODEKING23
  • 11
  • 1
  • please show your code – token Aug 13 '20 at 06:57
  • Is this answer of your question? https://stackoverflow.com/a/28036805/12261752 – Pruthvi Barot Aug 13 '20 at 07:10
  • I have asked a similar question explained in a bit more detail here https://stackoverflow.com/questions/63382308/django-drf-put-request-imagefield. I think the above link does not answer the question as the image being received is not Base64 string, it is the URL django creates and sends in the GET request – dracarys Aug 13 '20 at 07:31

0 Answers0