mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-05 13:45:57 +00:00
fix upload progress count
This commit is contained in:
@@ -96,27 +96,11 @@
|
|||||||
"/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~81c8aec0.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~81c8aec0.js?id=ca3b57f70682c1c315f7",
|
"/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~81c8aec0.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~81c8aec0.js?id=ca3b57f70682c1c315f7",
|
||||||
"/vendors~chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js": "/vendors~chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js?id=9d10953d3b088324dfe3",
|
"/vendors~chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js": "/vendors~chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js?id=9d10953d3b088324dfe3",
|
||||||
"/vendors~chunks/platform~chunks/shared.js": "/vendors~chunks/platform~chunks/shared.js?id=7d09e0b0658e140a7ffa",
|
"/vendors~chunks/platform~chunks/shared.js": "/vendors~chunks/platform~chunks/shared.js?id=7d09e0b0658e140a7ffa",
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.402f850c3d59e5227b2a.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.402f850c3d59e5227b2a.hot-update.js",
|
"/js/main.c4c494eb0b8f3148e2b4.hot-update.js": "/js/main.c4c494eb0b8f3148e2b4.hot-update.js",
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.3b04312cf9a9e3faa9d0.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.3b04312cf9a9e3faa9d0.hot-update.js",
|
"/chunks/files~chunks/platform~chunks/shared/file-browser.c4c494eb0b8f3148e2b4.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.c4c494eb0b8f3148e2b4.hot-update.js",
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.846b9434d6f6cf17c830.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.846b9434d6f6cf17c830.hot-update.js",
|
"/chunks/files~chunks/shared/file-browser.c4c494eb0b8f3148e2b4.hot-update.js": "/chunks/files~chunks/shared/file-browser.c4c494eb0b8f3148e2b4.hot-update.js",
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.f6bb3f1a4b07b9bc3df7.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.f6bb3f1a4b07b9bc3df7.hot-update.js",
|
"/js/main.3cb9742317ec0332f8fc.hot-update.js": "/js/main.3cb9742317ec0332f8fc.hot-update.js",
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.e233a033fc7bb6070a5b.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.e233a033fc7bb6070a5b.hot-update.js",
|
"/js/main.4cfcd101ec2b65d0f8a9.hot-update.js": "/js/main.4cfcd101ec2b65d0f8a9.hot-update.js",
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.4eed4a7968ac7ea44c08.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.4eed4a7968ac7ea44c08.hot-update.js",
|
"/js/main.1c4fd654c971c29349a4.hot-update.js": "/js/main.1c4fd654c971c29349a4.hot-update.js",
|
||||||
"/chunks/files~chunks/shared/file-browser.419c6cdfcadfe4e86332.hot-update.js": "/chunks/files~chunks/shared/file-browser.419c6cdfcadfe4e86332.hot-update.js",
|
"/js/main.1c16de546cf0d2dac814.hot-update.js": "/js/main.1c16de546cf0d2dac814.hot-update.js"
|
||||||
"/chunks/files~chunks/shared/file-browser.741ba7aadb75cbb854e8.hot-update.js": "/chunks/files~chunks/shared/file-browser.741ba7aadb75cbb854e8.hot-update.js",
|
|
||||||
"/chunks/files~chunks/shared/file-browser.b6fc75661d6178d3861b.hot-update.js": "/chunks/files~chunks/shared/file-browser.b6fc75661d6178d3861b.hot-update.js",
|
|
||||||
"/chunks/files~chunks/shared/file-browser.a5ba9693fb45d209affb.hot-update.js": "/chunks/files~chunks/shared/file-browser.a5ba9693fb45d209affb.hot-update.js",
|
|
||||||
"/chunks/files~chunks/shared/file-browser.00eef821a9dbfbb370a4.hot-update.js": "/chunks/files~chunks/shared/file-browser.00eef821a9dbfbb370a4.hot-update.js",
|
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.eb9c898101cd9e31b130.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.eb9c898101cd9e31b130.hot-update.js",
|
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.acc1e7ab1a97556789ee.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.acc1e7ab1a97556789ee.hot-update.js",
|
|
||||||
"/chunks/files~chunks/shared/file-browser.e3ab4dbdab7f7f6601c6.hot-update.js": "/chunks/files~chunks/shared/file-browser.e3ab4dbdab7f7f6601c6.hot-update.js",
|
|
||||||
"/chunks/files~chunks/shared/file-browser.2ea625f119d7304b0671.hot-update.js": "/chunks/files~chunks/shared/file-browser.2ea625f119d7304b0671.hot-update.js",
|
|
||||||
"/chunks/files~chunks/shared/file-browser.b60fe024dcf1f534e6ee.hot-update.js": "/chunks/files~chunks/shared/file-browser.b60fe024dcf1f534e6ee.hot-update.js",
|
|
||||||
"/chunks/files~chunks/shared/file-browser.d897d4ccbe14170233dc.hot-update.js": "/chunks/files~chunks/shared/file-browser.d897d4ccbe14170233dc.hot-update.js",
|
|
||||||
"/chunks/files~chunks/shared/file-browser.ce9023d33c71bac3ccea.hot-update.js": "/chunks/files~chunks/shared/file-browser.ce9023d33c71bac3ccea.hot-update.js",
|
|
||||||
"/chunks/files~chunks/shared/file-browser.7f8a47121e7fbf584b5e.hot-update.js": "/chunks/files~chunks/shared/file-browser.7f8a47121e7fbf584b5e.hot-update.js",
|
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.eed1eebd1490d7cad42b.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.eed1eebd1490d7cad42b.hot-update.js",
|
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.010132de11c2619f657a.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.010132de11c2619f657a.hot-update.js",
|
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.262f08f1790e4bb897a4.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.262f08f1790e4bb897a4.hot-update.js",
|
|
||||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.013c25893c394c494b97.hot-update.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.013c25893c394c494b97.hot-update.js"
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -174,17 +174,17 @@ const actions = {
|
|||||||
commit('SHIFT_FROM_FILE_QUEUE')
|
commit('SHIFT_FROM_FILE_QUEUE')
|
||||||
|
|
||||||
// Check if user is in uploading folder, if yes, than show new file
|
// Check if user is in uploading folder, if yes, than show new file
|
||||||
if (response.data.folder_id == getters.currentFolder.id) {
|
if (response.data.folder_id === getters.currentFolder.id) {
|
||||||
|
|
||||||
// Add uploaded item into view
|
// Add uploaded item into view
|
||||||
commit('ADD_NEW_ITEMS', response.data)
|
commit('ADD_NEW_ITEMS', response.data)
|
||||||
|
|
||||||
// Reset file progress
|
// Reset file progress
|
||||||
commit('UPLOADING_FILE_PROGRESS', 0)
|
commit('UPLOADING_FILE_PROGRESS', 0)
|
||||||
|
}
|
||||||
|
|
||||||
// Increase count in files in queue uploaded for 1
|
// Increase count in files in queue uploaded for 1
|
||||||
commit('INCREASE_FILES_IN_QUEUE_UPLOADED')
|
commit('INCREASE_FILES_IN_QUEUE_UPLOADED')
|
||||||
}
|
|
||||||
|
|
||||||
// Start uploading next file if file queue is not empty
|
// Start uploading next file if file queue is not empty
|
||||||
if (getters.fileQueue.length) {
|
if (getters.fileQueue.length) {
|
||||||
|
|||||||
@@ -112,13 +112,16 @@ class UploadFileAction
|
|||||||
|
|
||||||
$last_folder = $parent;
|
$last_folder = $parent;
|
||||||
|
|
||||||
|
// Get already created structure of the file parents
|
||||||
$structure = Folder::whereIn('name', $folders)->with('parent')->get();
|
$structure = Folder::whereIn('name', $folders)->with('parent')->get();
|
||||||
|
|
||||||
|
// If file have some parent folders
|
||||||
if( count($folders) > 0) {
|
if( count($folders) > 0) {
|
||||||
|
|
||||||
|
|
||||||
if(count($folders) === count($structure) ) {
|
if(count($folders) === count($structure) ) {
|
||||||
|
|
||||||
|
// Check if file parents are equal to already existed folder structure
|
||||||
$last_folder = $this->check_folder_structure($structure, $folders);
|
$last_folder = $this->check_folder_structure($structure, $folders);
|
||||||
|
|
||||||
} else if (count($folders) !== count($structure)) {
|
} else if (count($folders) !== count($structure)) {
|
||||||
@@ -126,6 +129,7 @@ class UploadFileAction
|
|||||||
|
|
||||||
if(count($structure) > 0) {
|
if(count($structure) > 0) {
|
||||||
|
|
||||||
|
// Check what folders are missed in structure and return missed folder with last created folder in structure
|
||||||
$data = $this->check_exist_folders($structure, $folders);
|
$data = $this->check_exist_folders($structure, $folders);
|
||||||
|
|
||||||
$folders = $data[0];
|
$folders = $data[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user