Relative Content

Tag Archive for reactjsfilepostdjango-rest-framework

React Djangorest Framework Post request error 405 cant post file

I have a application that allows me to login a user, which I create on the backend, and then I want to post a file to my backend from the frontend. I am using the Django user model which allows me to post the profile info to login. Once im logged in I get a error 405, I believe this means my views.py isnt working properly. Can someone explain how to make this post request correctly? Is there any standard model I can incorporate to make this work like the user model? Maybe CreateApiView?
Here is my backend:
Views.py