Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.14 KB

README.md

File metadata and controls

46 lines (35 loc) · 1.14 KB

uppy-aws-amplify

The AWS Amplify Storage (S3) plugin for uppy which can be used to upload files directly to an S3 bucket using an AWS Amplify session.

This package uses Storage from the aws-amplify package under the hood, which will use the default configuration you're using for AWS Amplify in your app.

Example

import Uppy from '@uppy/core'
import AwsAmplify from 'uppy-aws-amplify'
import { Storage } from 'aws-amplify'

const uppy = Uppy()

uppy.use(AwsAmplify, {
  // configured AWS Amplify Storage reference
  // with `get` and `put` methods
  storage: Storage,
  // default options passed to `Storage.get(...)`
  getOptions: {
    download: false
  },
  limit: 4,
  async getUploadParameters (file) {
    return {
      // Example: to avoid filename conflicts
      filename: `${Date.now()}-${file.name}`
    }
  }
})

Installation

$ npm install uppy-aws-amplify --save

or

$ yarn add uppy-aws-amplify

We recommend installing from yarn and then using a module bundler such as Webpack, Browserify or Rollup.js.