1.0.5 • Published 6 years ago
uppy-aws-amplify v1.0.5
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 --saveor
$ yarn add uppy-aws-amplifyWe recommend installing from yarn and then using a module bundler such as Webpack, Browserify or Rollup.js.