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 ( ) {
@@ -2005,13 +2008,11 @@ $(document).ready(function () {
2005
2008
}
2006
2009
2007
2010
// Dropzone
2008
- var $dropzone = $ ( '#dropzone' ) ;
2011
+ const $dropzone = $ ( '#dropzone' ) ;
2009
2012
if ( $dropzone . length > 0 ) {
2010
- // Disable auto discover for all elements:
2011
- Dropzone . autoDiscover = false ;
2013
+ const filenameDict = { } ;
2012
2014
2013
- var filenameDict = { } ;
2014
- $dropzone . dropzone ( {
2015
+ new Dropzone ( "#dropzone" , {
2015
2016
url : $dropzone . data ( 'upload-url' ) ,
2016
2017
headers : { "X-Csrf-Token" : csrf } ,
2017
2018
maxFiles : $dropzone . data ( 'max-file' ) ,
@@ -2039,7 +2040,7 @@ $(document).ready(function () {
2039
2040
} ) ;
2040
2041
}
2041
2042
} )
2042
- }
2043
+ } ,
2043
2044
} ) ;
2044
2045
}
2045
2046
You can’t perform that action at this time.
0 commit comments