Conversation
Someone is attempting to deploy a commit to a Personal Account owned by @spencerwooo on Vercel. @spencerwooo first needs to authorize it. |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/spencerwoo/onedrive-vercel-index/8kRW6fFKDYsMJd2QBq6wQBw84r7p |
A complete, self(but roughly)-tested impl of folder download is available at https://github.com/myl7/onedrive-vercel-index branch folderdl. I will rebase it into the PR when possible as said above. |
Now that #169 is merged, I think we can continue working on this. ;) |
change DFS to BFS with same level folders fetched concurrently. merge helper class into traversing func.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go, thanks for the two PRs!
As a draft, the PR adds some utilities for folder download, allowing one-shot access to recursive tree-like file metadata in the listing page.Updated: The PR adds folder download support. It adds download buttons for folders in file listing page. By the download button, the folder can be downloaded as a zip with the same folder structure as it in OneDrive. It also provides utils for one-shot access to recursive tree-like file metadata.
Due to react hook limit (no conditional call or called in loop), this API does not reuse SWR cache (I tried still can not figure out how to, though SWR team is working on it), but fetches
/api
immediately and arranges the responses. It makes the API pretty slow (seconds for 3 level folder). However, if it is for user one-shot action like downloading a folder (#136 #143) or searching once (#151 if combined with some string similarity checking), personally speaking it is acceptable.Folder download function impl requires some functions included in PR #169 . I will give a more complete impl if the PR is passed.