File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ function htmlEncode(text) {
10
10
var csrf ;
11
11
var suburl ;
12
12
13
+ // Disable Dropzone auto-discover because it's manually initialized
14
+ Dropzone . autoDiscover = false ;
15
+
13
16
// Polyfill for IE9+ support (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)
14
17
if ( ! Array . from ) {
15
18
Array . from = ( function ( ) {
@@ -1972,13 +1975,11 @@ $(document).ready(function () {
1972
1975
}
1973
1976
1974
1977
// Dropzone
1975
- var $dropzone = $ ( '#dropzone' ) ;
1978
+ const $dropzone = $ ( '#dropzone' ) ;
1976
1979
if ( $dropzone . length > 0 ) {
1977
- // Disable auto discover for all elements:
1978
- Dropzone . autoDiscover = false ;
1980
+ const filenameDict = { } ;
1979
1981
1980
- var filenameDict = { } ;
1981
- $dropzone . dropzone ( {
1982
+ new Dropzone ( "#dropzone" , {
1982
1983
url : $dropzone . data ( 'upload-url' ) ,
1983
1984
headers : { "X-Csrf-Token" : csrf } ,
1984
1985
maxFiles : $dropzone . data ( 'max-file' ) ,
@@ -2006,7 +2007,7 @@ $(document).ready(function () {
2006
2007
} ) ;
2007
2008
}
2008
2009
} )
2009
- }
2010
+ } ,
2010
2011
} ) ;
2011
2012
}
2012
2013
You can’t perform that action at this time.
0 commit comments