Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport `FileList` as input for the `seed` method #153
Conversation
The W3C `FileList` object has no `map` method, thus it needs to be converted to an array before using.
This comment has been minimized.
This comment has been minimized.
|
Thanks for catching this. I never caught this because my drag-drop module returns a proper array, not a FileList. We need better browser tests to catch things like this going forward. This is a good start, but it's also a partial fix because the lines that create the file buffer (https://github.com/feross/webtorrent/pull/153/files#diff-168726dbe96b3ce427e7fedce31bb0bcR208) will not access the file data from the FileList correctly. I'll fix this. |
Support `FileList` as input for the `seed` method
This comment has been minimized.
This comment has been minimized.
|
@valeriangalliat Okay, you should now be able to seed a |
This comment has been minimized.
This comment has been minimized.
|
Awesome, thank you! |
This comment has been minimized.
This comment has been minimized.
|
@valeriangalliat - sorry, there was a bug in 0.10.1. Give 0.10.2 a try! |
This comment has been minimized.
This comment has been minimized.
|
No problem, I didn't have the time to try it yet. I'll give you feedback in the following days. :) |
valeriangalliat commentedOct 18, 2014
The W3C
FileListobject has nomapmethod, thus it needs to be converted to an array before using.Otherwise I got
input.map is not a functionwith the following code: