mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-20 20:25:01 +00:00
refactoring
This commit is contained in:
+5
-4
@@ -236,18 +236,19 @@ const FunctionHelpers = {
|
||||
totalUploadedSize: uploadedSize
|
||||
}).then(() => {
|
||||
uploadedSize = uploadedSize + chunk.size
|
||||
}).catch((error) => {
|
||||
}).catch(error => {
|
||||
|
||||
// Count attempts
|
||||
attempts++
|
||||
|
||||
// Show Error
|
||||
if (attempts === 3)
|
||||
this.$isSomethingWrong()
|
||||
//if (attempts === 3)
|
||||
|
||||
// Break uploading process
|
||||
if ([500, 422].includes(error.response.status))
|
||||
if ([500, 422].includes(error.response.status)) {
|
||||
isNotGeneralError = false
|
||||
this.$isSomethingWrong()
|
||||
}
|
||||
})
|
||||
} while (isNotGeneralError && attempts !== 0 && attempts !== 3)
|
||||
|
||||
|
||||
-3
@@ -225,9 +225,6 @@ const actions = {
|
||||
}
|
||||
}
|
||||
|
||||
console.log(error.response);
|
||||
console.log(error.response.status);
|
||||
|
||||
events.$emit('alert:open', {
|
||||
emoji: '😬😬😬',
|
||||
title: messages[error.response.status]['title'],
|
||||
|
||||
Reference in New Issue
Block a user