Skip to content

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