holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.86k stars 135 forks source link

fix: Add missing options to storage constructor #296

Closed okdistribute closed 1 year ago

okdistribute commented 4 years ago

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.

mafintosh commented 1 year ago

Old major, thanks tho!