Closed radwouters closed 4 years ago
Hey, I think there might be an issue with the update
event in hyperdrive right now where the update event isn't firing. https://github.com/hypercore-protocol/hyperdrive/issues/284
I've been temporarily working around it by listening to archive.metadata.on('remote-update', () => {})
which fires sometimes when there aren't updates too, but is better than nothing. 😅
Hey, just figured it out thanks to Mafintosh.
Instead of using the update
event, you should use archive.watch('/', () => {})
to watch for changes. 😁
Hey guys,
I have some problems with adding files to an archive. I use chokidar to watch a folder as follows:
Which works as expected: It adds the file to the archive and lists it in
archive.readdir('/')
.However, when using the following code to watch for updates, it does not register any updates:
This is wrapped in a async click listener in a react electron app.
Am I missing something? Is it the async method?