Answer the question
In order to leave comments, you need to log in
How can I validate an image in a POST?
Hello.
I'm writing an API using Django Rest Framework.
Wrote a method that saves a picture that comes in a POST request.
How can I check it?
If everything is clear with text data, then what about files, in this case with an image?
I tried to create an html file with the form and the fields that the method accepts, but then it swears at the csrf token, which is not in the form.
Answer the question
In order to leave comments, you need to log in
through the extension i.e. jpeg png or svg . A more detailed question, but somehow it's not very clear
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question