Skip to content

Commit

Permalink
Web: Files: fixed folders upload
Browse files Browse the repository at this point in the history
  • Loading branch information
gopienkonikita committed Oct 27, 2021
1 parent f923786 commit ca52c40
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions products/ASC.Files/Client/src/store/UploadDataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,24 +466,27 @@ class UploadDataStore {
setFilter,
} = this.filesStore;

const newFiles = files;
const newFolders = folders;

const addNewFile = () => {
if (folderInfo) {
folderInfo && newFolders.unshift(folderInfo);
setFolders(newFolders);
const newFilter = filter;
newFilter.total = newFilter.total += 1;
setFilter(newFilter);
} else {
currentFile &&
currentFile.fileInfo &&
newFiles.unshift(currentFile.fileInfo);
setFiles(newFiles);
const newFilter = filter;
newFilter.total = newFilter.total += 1;
setFilter(newFilter);
}

const newFilter = filter;
newFilter.total = newFilter.total += 1;
};

const newFiles = files;
const newFolders = folders;

if (!currentFile && !folderInfo) return;

if (filter.total >= filter.pageCount) {
Expand Down Expand Up @@ -586,7 +589,11 @@ class UploadDataStore {
}
return Promise.resolve();
} else {
return this.throttleRefreshFiles(toFolderId, currentFile, folderInfo);
//TODO:
if (currentFile.action === "uploaded") {
return this.throttleRefreshFiles(toFolderId, currentFile, folderInfo);
}
return Promise.resolve();
}
};

Expand Down

0 comments on commit ca52c40

Please sign in to comment.