fixed upload files in the nested levels of folders

This commit is contained in:
Milos Holba
2021-08-11 17:15:02 +02:00
parent 717f28608f
commit ec2a10e32f
4 changed files with 144 additions and 67 deletions

View File

@@ -164,7 +164,7 @@ const actions = {
})
.catch(() => Vue.prototype.$isSomethingWrong())
},
uploadFiles: ({commit, getters}, {form, fileSize, totalUploadedSize}) => {
uploadFiles: ({commit, getters, dispatch}, {form, fileSize, totalUploadedSize}) => {
return new Promise((resolve, reject) => {
// Get route
@@ -222,8 +222,13 @@ const actions = {
}
// Reset upload process
if (!getters.fileQueue.length)
if (!getters.fileQueue.length) {
commit('CLEAR_UPLOAD_PROGRESS')
// Reload files after upload is done
dispatch('getFolder', [{folder: getters.currentFolder, back: true, init: false}])
}
}
})
.catch(error => {