Small zome to create and retrieve files, in holochain RSM.
This module is designed to be included in other DNAs, assuming as little as possible from those. It is packaged as a holochain zome, and an npm package that offers native Web Components that can be used across browsers and frameworks.
Please note that this module is in its early development
- You have only one DNA in which you want to store the files in your happ (this will be changed in the future).
- Create a new folder in the
zomes
of the consuming DNA, with the namefile_storage
. - Add a new
Cargo.toml
in that folder. In its content, paste theCargo.toml
content from any zome. - Change the
name
properties of theCargo.toml
file tofile_storage
. - Add this zome as a dependency in the
Cargo.toml
file:
[dependencies]
file_storage = {git = "https://github.com/holochain-open-dev/file-storage-module", package = "file_storage"}
- If you want to give the zome a different name you should also initialize the
FileStorageService
with it.
- Create a
src
folder besides theCargo.toml
with this content:
extern crate file_storage;
- Add the zome into your
*.dna.workdir/dna.json
file. - Compile the DNA with the usual
CARGO_TARGET=target cargo build --release --target wasm32-unknown-unknown
.
npm install git://github.com/holochain-open-dev/file-storage.git#ui-build
Done! You can already use all the elements of this library. See our storybook
for documentation on those.
Visit the developer setup.