Commit 6854c29
authored
Dropzone uploadMultiple: true error fix
When you set Dropzone.options.uploadForm.uploadMultiple : true in config of an instance of dropzone 5.7.2 the request is created by dropzone creates multidimensional input of the upload like below;
upload[][0]: (binary)
upload[][1]: (binary)
upload[][2]: (binary)
When you send this request it is trying to validate this array values which is already array in UniSharp\LaravelFilemanager::uploadValidator() but it is not a instance of UploadedFile it is instance of array. So with flatting this array we convert request array to a single dimension array like below;
upload[0]: (binary)
upload[1]: (binary)
upload[2]: (binary)1 parent 7f07972 commit 6854c29
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
0 commit comments