How can I fix this "Dropzone already attached" error?
Defining below code globally will help:
Dropzone.autoDiscover = false;
You should use either
var myDropzone = new Dropzone("div#myDrop", { url: "/file/post"});
or
$("div#myDrop").dropzone({ url: "/file/post" });
not both. Basically what you are doing is calling the same thing twice.
Add Dropzone.autoDiscover = false
before $(document).ready
like this:
Dropzone.autoDiscover = false;
$(document).ready(function () {
});
<script>
Dropzone.autoDiscover = false;
$(document).ready(function() {
var myDrop= new Dropzone("#myDrop", {
url: '/admin/media'
});
});
</script>
instead of
<script>
$(document).ready(function() {
Dropzone.autoDiscover = false;
var myDrop= new Dropzone("#myDrop", {
url: '/admin/media'
});
});
</script>