|
|
|
@@ -187,6 +187,7 @@ export default { |
|
|
|
File.prototype.mozSlice || |
|
|
|
File.prototype.webkitSlice, |
|
|
|
chunkSize = 1024 * 1024 * 64, |
|
|
|
smallChunkSize = 1024 * 1024 * 1, |
|
|
|
chunks = Math.ceil(file.size / chunkSize), |
|
|
|
spark = new SparkMD5.ArrayBuffer(), |
|
|
|
fileReader = new FileReader(); |
|
|
|
@@ -236,7 +237,9 @@ export default { |
|
|
|
const start = currentChunk * chunkSize; |
|
|
|
const end = |
|
|
|
start + chunkSize >= file.size ? file.size : start + chunkSize; |
|
|
|
fileReader.readAsArrayBuffer(blobSlice.call(file, start, end)); |
|
|
|
const smallEnd = |
|
|
|
start + smallChunkSize >= file.size ? file.size : start + smallChunkSize; |
|
|
|
fileReader.readAsArrayBuffer(blobSlice.call(file, start, smallEnd)); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|