chunk upload and multipart upload beta.2

This commit is contained in:
carodej
2020-07-29 16:33:42 +02:00
parent 18761eb5b3
commit 46256f6332
6 changed files with 38 additions and 20 deletions
+3 -3
View File
@@ -114,13 +114,13 @@ const Helpers = {
// Set Data
let formData = new FormData(),
uploadedSize = 0,
isNotGeneralError = true
isNotGeneralError = true,
filename = Array(16).fill(0).map(x => Math.random().toString(36).charAt(2)).join('') + '-' + file.name + '.part'
do {
let isLast = chunks.length === 1,
chunk = chunks.shift(),
attempts = 0,
filename = Array(16).fill(0).map(x => Math.random().toString(36).charAt(2)).join('') + '-' + file.name + '.part'
attempts = 0
// Set form data
formData.set('file', chunk, filename);