I use / so that users can drag&drop images in the browser, so that they can then interact with them using JavaScript, so no server-side is involved.
How can I stop Dropzone.js from trying to upload the files?
How can I then access the dragged files via JavaScript (create a new <img>
tag containing that image)?
Currently I get this error:
I create the dropzone like this:
<form action="/file-upload"
class="dropzone"
id="my-awesome-dropzone">
</form>
I want the functionality to be the same as their demo on their website, where you can drag images but they are not uploaded.
Thanks!
I use http://www.dropzonejs./ so that users can drag&drop images in the browser, so that they can then interact with them using JavaScript, so no server-side is involved.
How can I stop Dropzone.js from trying to upload the files?
How can I then access the dragged files via JavaScript (create a new <img>
tag containing that image)?
Currently I get this error:
I create the dropzone like this:
<form action="/file-upload"
class="dropzone"
id="my-awesome-dropzone">
</form>
I want the functionality to be the same as their demo on their website, where you can drag images but they are not uploaded.
Thanks!
Share Improve this question asked Aug 27, 2013 at 13:00 XCSXCS 28.2k28 gold badges104 silver badges153 bronze badges 4- Where is your Javascript/jQuery part? – Ron van der Heijden Commented Aug 27, 2013 at 13:28
- What jQuery part? Dropzone doesn't require any jQuery to work. – XCS Commented Aug 27, 2013 at 13:29
- I have the same problem only my error is 419. Did you manage to solve it? – Kira Commented Oct 6, 2017 at 6:54
- @KiraArik Unfortunately I can't remember how I fixed the issue, I think I edited code in the library. Anyway this question is 4 years old and not relevant anymore probably (library has been updated since). – XCS Commented Oct 6, 2017 at 16:32
2 Answers
Reset to default 4you can set autoProcessQueue:false
autoProcessQueue -> When set to false you have to call myDropzone.processQueue() yourself in order to upload the dropped files. See below for more information on handling queues.
and you can navigate to the tags using jquery
Maybe try and stop the submitting like this:
<form action="/file-upload"
class="dropzone"
id="my-awesome-dropzone"
onsubmit="return false">
</form>