Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joelvh/uppy-aws-amplify

Upload to AWS Amplify Storage (S3) with Uppy
https://github.com/joelvh/uppy-aws-amplify

amplify aws aws-amplify aws-s3 js npm npm-package upload uploader uppy yarn yarn-packages

Last synced: about 3 hours ago
JSON representation

Upload to AWS Amplify Storage (S3) with Uppy

Awesome Lists containing this project

README

        

# uppy-aws-amplify

The AWS Amplify Storage (S3) plugin for [uppy](https://uppy.io) 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

```es6
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

```bash
$ npm install uppy-aws-amplify --save
```

or

```bash
$ yarn add uppy-aws-amplify
```

We recommend installing from yarn and then using a module bundler such as [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/).