File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1659,6 +1659,14 @@ class FilesCollection
1659
1659
binData : evt .data .bin
1660
1660
chunkId : evt .data .chunkId
1661
1661
1662
+ if @config .isBase64
1663
+ pad = opts .binData .length % 4
1664
+ if pad
1665
+ p = 0
1666
+ while p < pad
1667
+ opts .binData += ' ='
1668
+ p++
1669
+
1662
1670
@ emitEvent ' data' , [evt .data .bin ]
1663
1671
if @pipes .length
1664
1672
for pipeFunc in @pipes
@@ -1819,8 +1827,13 @@ class FilesCollection
1819
1827
if @config .transport is ' http'
1820
1828
@config .chunkSize = Math .round @config .chunkSize / 2
1821
1829
1822
- @config .chunkSize = Math .floor (@config .chunkSize / 8 ) * 8
1823
- _len = Math .ceil (@fileData .size / @config .chunkSize )
1830
+ if @config .isBase64
1831
+ @config .chunkSize = Math .floor (@config .chunkSize / 4 ) * 4
1832
+ _len = Math .ceil (@config .file .length / @config .chunkSize )
1833
+ else
1834
+ @config .chunkSize = Math .floor (@config .chunkSize / 8 ) * 8
1835
+ _len = Math .ceil (@fileData .size / @config .chunkSize )
1836
+
1824
1837
if @config .streams is ' dynamic'
1825
1838
@config .streams = _ .clone _len
1826
1839
@config .streams = 24 if @config .streams > 24
You can’t perform that action at this time.
0 commit comments