mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
refactoring
This commit is contained in:
9
resources/js/helpers/functionHelpers.js
vendored
9
resources/js/helpers/functionHelpers.js
vendored
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user