hyperdrive icon indicating copy to clipboard operation
hyperdrive copied to clipboard

fix: Add missing options to storage constructor

Open okdistribute opened this issue 5 years ago • 0 comments

The README says:

The storage parameter defines how the contents of the drive will be stored....

  • name: the name of the file to be stored
  • opts
    • key: the feed key of the underlying Hypercore instance
    • discoveryKey: the discovery key of the underlying Hypercore instance
  • drive: the current Hyperdrive instance

It wasn't clear to me if opts still has the feed key and discovery key, but I pass them along here anyway. If the README is out of date, I can update it too in this PR.

This feature /could be/(?) useful if you are creating a storage adapter that needs the drive/hypertrie, like files-as-files, although I haven't gone too far down that rabbithole yet.

okdistribute avatar Aug 29 '20 06:08 okdistribute