🚀 DAY 3 OF LAUNCH WEEK: Introducing Webhook Events for Pull Request Scans.Learn more →
Socket
Book a DemoInstallSign in
Socket

@tanker/filekit

Package Overview
Dependencies
Maintainers
5
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanker/filekit

Tanker FileKit SDK

latest
Source
npmnpm
Version
2.26.0
Version published
Maintainers
5
Created
Source

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);

Keywords

tanker

FAQs

Package last updated on 13 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts