I was surfing to find some code to add to the dropzone script (that I’m using successfully), that would redirect after a file is uploaded. I found and added the script below, and it works successfully.
I have two questions - one is what is the auto discover feature? I’ve seen something that said ‘it scans the document for dropzone elements’, what does that mean ?
The other question is - can you help me add some code to delay the redirect, it’s so immediate. A slight delay would be an improvement.
Thanks for any help. Here’s the code:
<script type="text/javascript">
//Disabling autoDiscover
Dropzone.autoDiscover = false;
$(function() {
//Dropzone class
var myDropzone = new Dropzone(".dropzone");
myDropzone.on("queuecomplete", function() {
//Redirect URL
window.location.href = 'http://.....';
});
});
</script>