This package has been deprecated

Author message:

Package no longer supported. A migration guide is available at https://docs.tanker.io/latest/release-notes/core/js/guide/#replacing_filekit_with_tankers_core_sdk

@tanker/filekit
TypeScript icon, indicating that this package has built-in type declarations

2.26.0 • Public • Published

FileKit

FileKit is an end-to-end encrypted file storage service for apps.

FileKit stores and transfers files in the cloud. The files are encrypted in the browser before being uploaded, and can be downloaded only by the owner and recipients, completely transparently.

It wraps Tanker Core and Tanker VerificationUI in a single easy-to-use to use package.

Live demo

Here is an example of what an application built with FileKit can do.

FileKit app example

Getting started

To get started, you can read the tutorial on creating a secure file transfer app.

Documentation

Our detailed documentation is available here.

Example usage

import FileKit from '@tanker/filekit';

// Initialize the FileKit object
const appId = 'Your app ID';
const filekit = new FileKit({ appId });

// Start a session
const email = 'alice@company.com';
const tankerIdentity = await yourServer.authenticate(email);
await fileKit.start(email, { identity: tankerIdentity });

// Encrypt and upload a file from <input type="file" id="fileInput" />
const fileToUpload = document.getElementById('fileInput').files[0];
const fileId = await fileKit.upload(fileToUpload);

// Download, decrypt, and save a file to disk
await fileKit.downloadToDisk(fileId);

// Download, decrypt, and get a File object
const file = await fileKit.download(fileId);

Package Sidebar

Install

npm i @tanker/filekit

Homepage

tanker.io/

Weekly Downloads

2

Version

2.26.0

License

Apache-2.0

Unpacked Size

16.5 kB

Total Files

11

Last publish

Collaborators

  • jmounier
  • maximerety
  • tankeradmin
  • quentin.vernot.tanker