-
Notifications
You must be signed in to change notification settings - Fork 492
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: drop multiple files on chrome #1049
Conversation
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
@olizilla why I haven't done the tests for this: #1047 (comment) |
@hacdias 👍 you could publish it under your npm namespace like |
So it'd be rad to add tests for the We'd need to do some mocking... each item in the input array needs a It's a bit of work, but it'd be really nice. |
For example we should test what happens when a brower use
https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem/webkitGetAsEntry |
@olizilla yeah, thanks. I'm aware of the structure, I've already started them 😃 |
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
@olizilla I'm hitting an infinite loop on the directory tests and I don't know why. I know the loop is happening on the module ( |
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
@olizilla found the issue. Ready for review 😃 |
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 stuff! Some minor tweaks to do.
More significantly, now that this code can handle the case where the user drops mutliple directories, i notice that I can't actually drop multiple directories in practice due to an error around the logic of counting how many directories we expect go-ipfs will make... can you take a look...
https://github.com/ipfs-shipyard/ipfs-webui/blob/master/src/lib/count-dirs.test.js#L32-L42
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
@olizilla just updated the tests. One question about https://github.com/ipfs-shipyard/ipfs-webui/blob/master/src/lib/count-dirs.test.js#L32-L42. Why is it testing against 8? Is that the wrong part? |
@hacdias it assumes ipfs will make a dir for the root |
@hacdias does that make sense? |
@olizilla yes, it does. Could we merge this PR and I'll take a look at count-dirs on another one? |
Fixes #1045 by using my fork of
datatransfer-files-promise
. I didn't publish it because I was hoping the original creator would accept my PR, although @grabantot doesn't seem very active on GitHub.License: MIT
Signed-off-by: Henrique Dias hacdias@gmail.com