I want to automatically redirect to another page when I drag a file without pressing the send button. I don't really want anything else on the page except the drag and drop interface. Is this possible? I found a code to redirect when the send button is pressed, how can I rewrite it?
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
setTimeout( () => {
location = '/';
}, 3000 ); // Wait for 3 seconds to redirect.
}, false );
</script>