File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ function htmlEncode(text) {
1010var csrf ;
1111var suburl ;
1212
13+ // Disable Dropzone auto-discover because it's manually initialized
14+ Dropzone . autoDiscover = false ;
15+
1316// Polyfill for IE9+ support (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)
1417if ( ! Array . from ) {
1518 Array . from = ( function ( ) {
@@ -2005,13 +2008,11 @@ $(document).ready(function () {
20052008 }
20062009
20072010 // Dropzone
2008- var $dropzone = $ ( '#dropzone' ) ;
2011+ const $dropzone = $ ( '#dropzone' ) ;
20092012 if ( $dropzone . length > 0 ) {
2010- // Disable auto discover for all elements:
2011- Dropzone . autoDiscover = false ;
2013+ const filenameDict = { } ;
20122014
2013- var filenameDict = { } ;
2014- $dropzone . dropzone ( {
2015+ new Dropzone ( "#dropzone" , {
20152016 url : $dropzone . data ( 'upload-url' ) ,
20162017 headers : { "X-Csrf-Token" : csrf } ,
20172018 maxFiles : $dropzone . data ( 'max-file' ) ,
@@ -2039,7 +2040,7 @@ $(document).ready(function () {
20392040 } ) ;
20402041 }
20412042 } )
2042- }
2043+ } ,
20432044 } ) ;
20442045 }
20452046
You can’t perform that action at this time.
0 commit comments