@scoir/filestack

3.0.1 • Public • Published

filestack

This utility helps with integration with Google Analytics in a React context.

Usage

Factory

Factory for wrapping filestack in promise aware methods. The first argument is the CLIENT_KEY. The second argument is the filestack instance provided by importing: <script type="text/javascript" src="https://api.filestackapi.com/filestack.js"></script>

import filestackFactory, { fileExtensions } from '@scoir/filestack';
filestackFactory(YOUR_KEY, filestackInstance);

Instance

The factory creates an object that provides filestack with some methods that have been "promisified". "Promisified" methods as follows:

  • upload (file, storeOptions)
    • file -- raw data, a Blob, or a DOM File Object
    • storeOptions -- configuration on storing the data
  • export (handle)
    • handle -- Blob or URL
    • use upload to generate a Blob first if using raw data or a DOM File Object
  • pickAndStore (pickerOptions, storeOptions)
    • pickerOptions -- configuration on picker modal behavior
    • storeOptions -- configuration on storing the data

Readme

Keywords

none

Package Sidebar

Install

npm i @scoir/filestack

Weekly Downloads

66

Version

3.0.1

License

UNLICENSED

Unpacked Size

20 kB

Total Files

11

Last publish

Collaborators

  • jasonblanchard
  • alittletonscoir
  • rocky.egawa
  • eric.kertzscoir
  • bonsebas
  • brynkng
  • azragal
  • jhudzik
  • jaymi_johnson
  • jspencer_scoir
  • dkozicki
  • scoir-kevinrathgeber
  • sully-scoir
  • smclaughlin-scoir
  • sbeyers
  • eriksuman
  • robelder
  • scoir-alexr
  • danancook
  • dmscoir
  • cbartlett33
  • jpshrader
  • cmccrory
  • ahagner
  • rrosenthal
  • cellisscoir
  • dbyler_scoir
  • mvannucciscoir
  • kjbillings
  • ccarson_scoir
  • scoir-dev
  • daynek
  • pjohnson11120
  • gakhvledi
  • thos-scoir
  • scoir-devops