Socket
Book a DemoInstallSign in
Socket

@ministryofjustice/fb-user-filestore-client-node

Package Overview
Dependencies
Maintainers
12
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ministryofjustice/fb-user-filestore-client-node

Form Builder User File Store Client (for Node)

latest
Source
npmnpm
Version
0.0.34
Version published
Maintainers
12
Created
Source

Form Builder User File Store client (Node)

Client for making requests to Form Builder platform user filestore endpoints

Requirements

Node

Installation

npm install @ministryofjustice/fb-user-filestore-client-node

Usage

Loading and initialising

// load client
const FBUserFileStoreClient = require('@ministryofjustice/fb-user-filestore-client-node')

// initialise client
const userFileStoreClient = new FBUserFileStoreClient(serviceSecret, serviceToken, serviceSlug, userFileStoreUrl)

Fetching and storing

// fetch user file
userFile = await userFileStoreClient.fetch(userId, userToken, fingerprint)
// userFile => { file }

// store user file
policy = { [max_size], [expires], [allowed_types] }
uploadDetails = await userFileStoreClient.store(userId, userToken, file, policy)
// uploadDetails => { fingerpint, url, size, type, date }

// store user file from file path
uploadDetails = await userFileStoreClient.storeFromPath(userId, userToken, filePath, policy)

FAQs

Package last updated on 17 Dec 2019

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