-
-
Notifications
You must be signed in to change notification settings - Fork 319
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: Delay folder upload until all children files are parsed #559
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/traverseFileTree.ts
Outdated
@@ -59,10 +61,15 @@ const traverseFileTree = (files: InternalDataTransferItem[], callback, isAccepte | |||
}, | |||
}); | |||
} | |||
callback([file]); | |||
flattenFileList.push(file); | |||
console.log(restDirectory); |
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.
不应该有这个。
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.
马上马上
这个好写测试用例不 |
其实根本不会写测试...,我先去看看吧,不行的话麻烦一下大佬了 |
学,以后PR处处要写。写一次就会了。 |
我尽量 |
@yoyo837 @afc163 佬,原有测试里模拟FileSystemEntry的函数处理文件夹时存在bug |
|
看 diff 不止一行改动。 |
测试那里我还没改,目前只是改了处理文件的地方,改动看起来比较大主要是应为把有个函数移到了另一个函数里面 |
先做最小改动吧,重构可以延后或提前做掉。 |
我之前的改动太大了吗,要重新弄吗 |
这个是必须的改动么? |
需要有变量来记录文件处理情况,如果不这样搞那就在外层弄一个 |
🤔 这个变动的性质是?
🔗 相关 Issue
antd issue
💡 需求背景和解决方案
当拖拽上传文件夹时,需要手动解析文件树,原代码在解析到子文件为非文件夹时直接执行后续而非等待全部文件解析完成,与普通上传的表现不一致。添加其他变量确保文件全部解析后再进行后续操作