- Notifications
You must be signed in to change notification settings - Fork0
Browser JavaScript binding for ZboxFS
License
zboxfs/zbox-browser
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This package is browser javascript binding forZboxFS.
ZboxFS is a zero-details, privacy-focused in-app file system. Its goal isto help application store files securely, privately and reliably. Check moredetails aboutZboxFS.
- Download
zbox-browser-0.6.0.tar.gzfromlatest release - Extract it to your website's
staticorpublicfolder - Import it using
<script>tag
<scriptsrc="zbox-browser-0.6.0/index.js"></script>
Note: because ofsame-origin policy restriction, use this package as across-origin script won't work.
Visithttps://zbox.io/try to create a test repo. Copy its URI and replace[your_repo_uri] in below.
<scriptsrc="zbox-browser-0.6.0/index.js"></script><script>(async()=>{// create a Zbox instanceconstzbox=newZbox();// initialise environment, called once before using Zboxawaitzbox.initEnv({log:{level:'debug'}});// open the repovarrepo=awaitzbox.openRepo({uri:'[your_repo_uri]',pwd:'secret password',opts:{create:true}});// create a fileletfile=awaitrepo.createFile('/hello_world.txt');// write content to fileawaitfile.writeOnce('Hello, World!');// seek to the beginning of fileawaitfile.seek({from:Zbox.SeekFrom.Start,offset:0});// read all content as stringconststr=awaitfile.readAllString()console.log(str);// close file, repo and exit Zboxawaitfile.close();awaitrepo.close();awaitzbox.exit();})();</script>
Check the API documentation athttps://docs.zbox.io/api/.
This is for advanced users who want to build this package by themselves.
You needDocker to build this package.
./scripts/build.sh
After running this command, package files will be created indist folderand ready to be released to GitHub.
To release this package to GitHub, you need aPersonal access tokens.
export ZBOX_BROWSER_GITHUB_TOKEN=[your Personal access token]node ./scripts/release.jsAfter running this command, release tarball will be created inrelease folderand uploaded to GitHub. A draft release will be created as well if it is notthere yet.
Latest code will also be committed, tagged and pushed to GitHub.
This package is licensed under the Apache 2.0 License - see theLICENSEfile for details.
About
Browser JavaScript binding for ZboxFS
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.