mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-25 02:10:39 +00:00
Merge remote-tracking branch 'origin/master' into oasis
# Conflicts: # composer.lock # public/chunks/admin-account.js # public/chunks/admin.js # public/chunks/app-appearance.js # public/chunks/app-billings.js # public/chunks/app-email.js # public/chunks/app-index.js # public/chunks/app-language.js # public/chunks/app-others.js # public/chunks/app-payments.js # public/chunks/app-settings.js # public/chunks/app-setup.js # public/chunks/billings-detail.js # public/chunks/dashboard.js # public/chunks/database.js # public/chunks/environment-setup.js # public/chunks/files.js # public/chunks/files~chunks/shared/file-browser.js # public/chunks/files~chunks/shared/file-browser~chunks/shared/single-file.js # public/chunks/homepage.js # public/chunks/installation-disclaimer.js # public/chunks/invoices.js # public/chunks/page-edit.js # public/chunks/pages.js # public/chunks/plan-create.js # public/chunks/plan-settings.js # public/chunks/plan-subscribers.js # public/chunks/plan.js # public/chunks/plans.js # public/chunks/platform.js # public/chunks/profile.js # public/chunks/profile~chunks/settings-password.js # public/chunks/purchase-code.js # public/chunks/settings-create-payment-methods.js # public/chunks/settings-invoices.js # public/chunks/settings-payment-methods.js # public/chunks/settings-storage.js # public/chunks/settings-subscription.js # public/chunks/settings.js # public/chunks/shared.js # public/chunks/shared/file-browser.js # public/chunks/stripe-credentials.js # public/chunks/subscription-plans.js # public/chunks/subscription-service.js # public/chunks/upgrade-billing.js # public/chunks/upgrade-plan.js # public/chunks/user-create.js # public/chunks/user-detail.js # public/chunks/user-invoices.js # public/chunks/user-storage.js # public/chunks/user-subscription.js # public/chunks/user.js # public/chunks/users.js # public/js/main.js # public/mix-manifest.json
This commit is contained in:
+25
-22
@@ -183,7 +183,7 @@ const actions = {
|
||||
'Content-Type': 'application/octet-stream'
|
||||
},
|
||||
onUploadProgress: event => {
|
||||
var percentCompleted = Math.floor(((totalUploadedSize + event.loaded) / fileSize) * 100)
|
||||
let percentCompleted = Math.floor(((totalUploadedSize + event.loaded) / fileSize) * 100);
|
||||
|
||||
commit('UPLOADING_FILE_PROGRESS', percentCompleted >= 100 ? 100 : percentCompleted)
|
||||
|
||||
@@ -195,33 +195,36 @@ const actions = {
|
||||
.then(response => {
|
||||
resolve(response)
|
||||
|
||||
commit('PROCESSING_FILE', false)
|
||||
// Proceed if was returned database record
|
||||
if (response.data.id) {
|
||||
|
||||
// Remove first file from file queue
|
||||
commit('SHIFT_FROM_FILE_QUEUE')
|
||||
commit('PROCESSING_FILE', false)
|
||||
|
||||
// Check if user is in uploading folder, if yes, than show new file
|
||||
if (response.data.folder_id == getters.currentFolder.id) {
|
||||
// Remove first file from file queue
|
||||
commit('SHIFT_FROM_FILE_QUEUE')
|
||||
|
||||
// Add uploaded item into view
|
||||
commit('ADD_NEW_ITEMS', response.data)
|
||||
// Check if user is in uploading folder, if yes, than show new file
|
||||
if (response.data.folder_id == getters.currentFolder.id) {
|
||||
|
||||
// Reset file progress
|
||||
commit('UPLOADING_FILE_PROGRESS', 0)
|
||||
// Add uploaded item into view
|
||||
commit('ADD_NEW_ITEMS', response.data)
|
||||
|
||||
// Increase count in files in queue uploaded for 1
|
||||
commit('INCREASE_FILES_IN_QUEUE_UPLOADED')
|
||||
// Reset file progress
|
||||
commit('UPLOADING_FILE_PROGRESS', 0)
|
||||
|
||||
// Increase count in files in queue uploaded for 1
|
||||
commit('INCREASE_FILES_IN_QUEUE_UPLOADED')
|
||||
}
|
||||
|
||||
// Start uploading next file if file queue is not empty
|
||||
if (getters.fileQueue.length) {
|
||||
Vue.prototype.$handleUploading(getters.fileQueue[0])
|
||||
}
|
||||
|
||||
// Reset upload process
|
||||
if (!getters.fileQueue.length)
|
||||
commit('CLEAR_UPLOAD_PROGRESS')
|
||||
}
|
||||
|
||||
// Start uploading next file if file queue is not empty
|
||||
if (getters.fileQueue.length) {
|
||||
Vue.prototype.$handleUploading(getters.fileQueue[0])
|
||||
}
|
||||
|
||||
// Reset upload process
|
||||
if (!getters.fileQueue.length)
|
||||
commit('CLEAR_UPLOAD_PROGRESS')
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
reject(error)
|
||||
|
||||
Reference in New Issue
Block a user