Answer the question
In order to leave comments, you need to log in
Why does working with files in a Django view cause a React page reload?
On the backend I use Django + DRF. I start the server with the command python3 manage.py runserver
Ubuntu 20.04.1 LTS
On the React 17.0.1 front I
send a POST request to the server using axios. On the server in the view, the following code is the simplest:
fd = open(pathFile, 'xb')
fd.close()
return Response(anyData)
fd = open(pathFile, 'wb')
fd.write(binaryData)
fd.close()
return Response(anyData)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question