Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement/Show_size_of_folder_and_files #108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Sumit931kr
Copy link

image

#5 issue
I created a different route for the size (/api/browse-withsize) because I don't want users to wait for the folder size. This operation takes some time.

@Sumit931kr
Copy link
Author

@mifi is this code alright?

@mifi
Copy link
Owner

mifi commented Nov 29, 2024

thanks for your pr. firstly there are build errors. but more importantly I think it needs to be refactored in a way so that it:

  • doesn't replace the files (setCurrentDirFiles(responseWithSize.data);), but instead it should supply the sizes only. currently the code is too duplicated
  • we need to be able to cancel this. so that when changing directory, the recursiev folder size check should be canceled, or else we would consume too many resources (cpu,memory). I think cancellation could happen with an AbortController that gets aborted when the http request gets aborted. and the client has to abort the request when the user navigates to a different folder. (probably also abortcontroller there)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants