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

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);

View File

@@ -94,6 +94,10 @@
this.$refs.verifyPurchaseCode.setErrors({
'Purchase Code': ['Purchase code is invalid.']
});
} else if (error.response.status == 404) {
this.$refs.verifyPurchaseCode.setErrors({
'Purchase Code': ['You may have misconfigured the app, please read the readme file and try it again.']
});
} else {
this.$refs.verifyPurchaseCode.setErrors({
'Purchase Code': ['Something is wrong. Please try again.']

View File

@@ -15,7 +15,7 @@
.error-message {
position: absolute;
left: 0;
bottom: -25px;
top: 50px;
}
}
}