# react-drag-n-drop-to-s3

> Drag and drop files to upload them to S3

Latest version **0.1.0** (published 2018-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-drag-n-drop-to-s3
pnpm add react-drag-n-drop-to-s3
yarn add react-drag-n-drop-to-s3
bun add react-drag-n-drop-to-s3
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-09-28 |
| First published | 2018-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Guillaume Grégoire |
| Maintainers | ggregoire |
| Keywords | react, component, drag, drop, upload, files, aws, s3, bucket |

## Links

- npm: https://www.npmjs.com/package/react-drag-n-drop-to-s3
- Repository: https://github.com/ggregoire/react-drag-n-drop-to-s3
- Homepage: https://github.com/ggregoire/react-drag-n-drop-to-s3#readme
- Issues: https://github.com/ggregoire/react-drag-n-drop-to-s3/issues
- npm.io page: https://npm.io/package/react-drag-n-drop-to-s3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-09-28
- 0.0.1-security — 2018-09-28

## README

# react-drag-n-drop-to-s3

React component to drag and drop files and upload them to AWS S3. Based on [react-dropzone](https://github.com/react-dropzone/react-dropzone) and [react-s3-uploader](https://github.com/odysseyscience/react-s3-uploader).

## Install

```
$ npm install react-drag-n-drop-to-s3 react-dropzone
```

## Example

```js
import DragNDropToS3 from 'react-drag-n-drop-to-s3'

const UploadAvatar = () => (
  <DragNDropToS3
    dropzoneProps={{
      accept: 'image/png',
      maxSize: 2000000,
    }}
    s3UploaderProps={{
      getSignedUrl: APIs.getSignedURL,
      autoUpload: true,
      onFinish: response => console.log(response.publicUrl),
    }}
  >
    {({ acceptedFiles }) => (
      <div>
        <p>Drop your avatar here or click to upload</p>
        <ul>
          {acceptedFiles.map((file, i) => (
            <li key={i}>{file.name}</li>
          ))}
        </ul>
      </div>
    )}
  </DragNDropToS3>
)
```

## Props

| Prop                | Description                                                                                                     | Type     | Required |
| ------------------- | --------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| **dropzoneProps**   | For the list of available options, see [react-dropzone](https://github.com/react-dropzone/react-dropzone)       | `Object` | No       |
| **s3UploaderProps** | For the list of available options, see [react-s3-uploader](https://github.com/odysseyscience/react-s3-uploader) | `Object` | No       |

---
_Source: https://npm.io/package/react-drag-n-drop-to-s3 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
