A
A
axce12017-09-12 13:16:59
Django
axce1, 2017-09-12 13:16:59

Why empty request.FILE on preventDefault?

there is a form with a field for entering text and adding a file, the whole thing goes through ajax
when I add preventDefault in the script I get an empty MultiValueDict
when I remove preventDefault the file is present, but it redirects to the response json page
how to do it correctly so that you can send the file and the server does not display json view response, but left it on the same page?
code https://gitlab.com/axce1/talk

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question