I am new to django. Can anybody help me... How can I upload a file using the Rest Framework API ?
I have tried following this page:
http://www.django-rest-framework.org/api-guide/parsers/#fileuploadparser
I am new to django. Can anybody help me... How can I upload a file using the Rest Framework API ?
I have tried following this page:
http://www.django-rest-framework.org/api-guide/parsers/#fileuploadparser
Zhe answer is pretty well. Besides, you can add some parameters in order to see the response. Take this one for example:
File uploading in Django REST framework is the same with uploading files in multipart/form in django.
To test it you can use curl:
Other fields are just like normal form fields in Django.