1.1.1 • Published 4 months ago

space-file-picker-first-test v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

File Picker

Opens a Space file picker dialog upon being called.

Note: For security reasons, file-picker must be triggered by an original DOM event (click, touchstart, keyup, etc.). It cannot be called onload or in a timeout.

Installation

$ npm install space-file-picker-first-test

Usage

import { SpacePicker } from "space-file-picker-first-test";

<SpacePicker
  key={Math.random()}
  open={dialogOpen}
  handleClose={handleCloseDialog}
  accessToken={accessToken}
  keyId={keyId}
  timestamp={timeStamp}
  signature={signature}
  uploadType={singleOrBatch}
  canUpload={canUpload}
  folderAllowed={folderAllowed}
  onHandleHashes={onHandleHashes}
/>;

API

filePicker(opts, fn)

Valid options:

  • open (Boolean) whether the user can select multiple files
  • handleClose (Function) Handles the closing state
  • accessToken (String)
  • keyId (String)
  • timestamp (String)
  • signature (String)
  • uploadType (String) can be single, batch or no_choice
  • canUpload (Boolean) whether the user can upload in the file picker
  • folderAllowed (Boolean) whether the user can select folders
  • onHandleHashes (Function) the callback function to receive the selected hashed like this: function onHandleHashes(hashes: any[]) { ... }

Browser support

  • Internet Explorer 9+
  • Firefox
  • Chrome
  • Opera
  • Safari
  • Mobile Safari
  • Android Browser

License

1.1.1

4 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago