1👍
✅
You set category=1
so Django expects to send a category
object but if you need to send the id of the object, set category_id=1
curl -X POST -F file=@mypng.jpg -F 'category_id=1' http://localhost/items/
Source:stackexchange.com