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 ( ) {
@@ -1972,13 +1975,11 @@ $(document).ready(function () {
19721975 }
19731976
19741977 // Dropzone
1975- var $dropzone = $ ( '#dropzone' ) ;
1978+ const $dropzone = $ ( '#dropzone' ) ;
19761979 if ( $dropzone . length > 0 ) {
1977- // Disable auto discover for all elements:
1978- Dropzone . autoDiscover = false ;
1980+ const filenameDict = { } ;
19791981
1980- var filenameDict = { } ;
1981- $dropzone . dropzone ( {
1982+ new Dropzone ( "#dropzone" , {
19821983 url : $dropzone . data ( 'upload-url' ) ,
19831984 headers : { "X-Csrf-Token" : csrf } ,
19841985 maxFiles : $dropzone . data ( 'max-file' ) ,
@@ -2006,7 +2007,7 @@ $(document).ready(function () {
20062007 } ) ;
20072008 }
20082009 } )
2009- }
2010+ } ,
20102011 } ) ;
20112012 }
20122013
You can’t perform that action at this time.
0 commit comments