st-react-uploader

0.3.0 • Public • Published

Scribble Tone React Uploader

React drag and drop file uploader for internal Scribble Tone usage. Feel free to use, but no promises that it'll work ;)

Install

npm install --save st-react-uploader

Usage

import {FileUploader} from 'st-react-uploader';

...

<FileUploader
  name='name_of_your_field'
  autoUpload={false}
  awsCredentials={{
    access_key_id: 'your key id',
    acl: 'private',
    policy: 'your base64 encoded policy',
    signature: 'your generated signature'
  }}
  bucketUrl={AppVars.s3TempBucketUrl}
  buildUid={true}
  onSuccess={(r)=>{console.log('success', r)}}
  submitBtnClass='btn'
/>

...

Notes

  • Policy and signature should probably be generated server side and passed in. See s3-authorize gem for ruby.

Readme

Keywords

none

Package Sidebar

Install

npm i st-react-uploader

Weekly Downloads

1

Version

0.3.0

License

ISC

Unpacked Size

12.9 kB

Total Files

6

Last publish

Collaborators

  • scribbletone