Answer the question
In order to leave comments, you need to log in
How to download a file from a JSON request?
Hello. I will be grateful for help.
There is a JSON request to the server that passes a file in the body (I'm currently using Postman to test the API).
How can I edit this file and save it to the server? I found a lot of articles on the Internet using REST FRAMEWORK, but I would like to write a solution without using this library.
As I understand it, the file lies in self.request.FILES.get('image'), and even through print in the terminal the file name is displayed. What's next? Can you suggest?
Answer the question
In order to leave comments, you need to log in
As I understand it, the file lies in self.request.FILES.get('image'), and even through print in the terminal the file name is displayed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question