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

fix: 修复文件夹上传每次只上传文件夹中100个文件的bug #6028

Merged
merged 2 commits into from
Jul 20, 2024

Conversation

x-carrier
Copy link
Contributor

@x-carrier x-carrier commented Jun 7, 2024

readEntries 每次调用最多返回 100 个条目。这是设计使然,目的是在处理可能非常大的目录时,不会导致内存溢出或性能问题。因此,每次调用 readEntries 时,它会返回 0 到 100 个条目。如果目录中的条目超过 100 个,需要多次调用 readEntries 来获取下一批条目。

close #6027

readEntries 每次调用最多返回 100 个条目。这是设计使然,目的是在处理可能非常大的目录时,不会导致内存溢出或性能问题。因此,每次调用 readEntries 时,它会返回 0 到 100 个条目。如果目录中的条目超过 100 个,需要多次调用 readEntries 来获取下一批条目。
Copy link

vercel bot commented Jun 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
naive-ui ❌ Failed (Inspect) Jul 20, 2024 2:35pm

@x-carrier x-carrier changed the title 修复文件夹上传每次只上传文件夹中100个文件的bug fix: 修复文件夹上传每次只上传文件夹中100个文件的bug Jun 7, 2024
@07akioni
Copy link
Collaborator

07akioni commented Jul 8, 2024

还有这种幺蛾子?

有什么 specification 能看到这个表现吗?

@07akioni
Copy link
Collaborator

07akioni commented Jul 8, 2024

学到了

@x-carrier
Copy link
Contributor Author

还有这种幺蛾子?

有什么 specification 能看到这个表现吗?
在这可以看到
https://developer.mozilla.org/zh-CN/docs/Web/API/FileSystemDirectoryReader/readEntries
image

@07akioni
Copy link
Collaborator

07akioni commented Jul 20, 2024

这 PR 改的 TS 编译没过

Type checking in this PR is not passed.

@07akioni
Copy link
Collaborator

还有一点就是 try catch 也被删掉了,其实最好不要这样,修 bug 的时候尽量不要影响原有表现。

Also, try catch is deleted. It would be better not doing so. When fixing bugs, try not to influence the original behavior.

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.

文件夹上传只会上传文件夹里的100个文件
2 participants