-
Notifications
You must be signed in to change notification settings - Fork 299
Conversation
@@ -63,6 +64,10 @@ function IpfsAPI (host_or_multiaddr, port) { | |||
opts = {} | |||
} | |||
|
|||
if (typeof files === 'string' && files.startsWith('http')) { | |||
files = request(files) |
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.
This sync call will block the loop (or am I missing some ES6 thing?)
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.
The request is a stream object, so it will not block but will be piped into the new request effectively as far as I understand :)
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.
`23:09 <+daviddias> dignifiedquire: interesting, so our thing understands 'strings', 'paths', 'buffers' and 'streams' too?``
Sweet!
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.
Better add a test and docs for adding with a stream though, otherwise that might change in the future and then we don't realize what broke the add by url was actually the lack of add by stream
@diasdavid all fixed and done, ready for consumption :) |
Thanks I love you. ❤️❤️❤️❤️❤️❤️❤️ Cool thing coming soon.
|
Closes #109