I can't figure out how to get JSONresponse after uploading a file using Dropzonejs.
I have just this:
<script src="{% static "dropzone/dropzone.js" %}"></script>
<form id="id_dropzone" class="dropzone" action="/ajax_file_upload_handler/"
enctype="multipart/form-data" method="post"></form>
I think it is not possible without manually initializing dropzone so I changed it to:
$("#id_dropzone").dropzone({
maxFiles: 2000,
url: "/ajax_file_upload_handler/",
success: function (file, response) {
console.log(response);
}
});
<form id="id_dropzone" class="" action=""
enctype="multipart/form-data" method="post"></form>
Which return Uncaught Error: No URL provided.
How can I initialize dropzone so I can add an options like maxFiles, maxSize and get JSON response?
console.log(response);
So what is the problem with it? – Apocarpous