# simple-react-file-upload

> This is a simple react component which can be used to make any element file uploadable on click.

Latest version **0.1.0** (published 2019-09-10) · 0 weekly downloads

## Install

```sh
npm install simple-react-file-upload
pnpm add simple-react-file-upload
yarn add simple-react-file-upload
bun add simple-react-file-upload
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-09-10 |
| First published | 2019-09-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 35.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | sarathsasikumar |

## Links

- npm: https://www.npmjs.com/package/simple-react-file-upload
- Repository: https://github.com/sarath-sasikumar/react-file-upload
- Homepage: https://github.com/sarath-sasikumar/react-file-upload#readme
- Issues: https://github.com/sarath-sasikumar/react-file-upload/issues
- npm.io page: https://npm.io/package/simple-react-file-upload

## Recent versions

- 0.1.0 (latest) — 2019-09-10

## README

# react-file-upload

This is a simple react component which can be used to make any element file uploadable on click.

## Setup

Install the package

```
npm i react-file-upload
```

## Usage

Import the component from the package

```
import { FileUpload } from 'react-file-upload'
```
Wrap the component around any element which needs show the option to upload file when clicked.

```
<FileUpload onFileUpload={this.onFileUpload}>
<!-- Any element-->
</FileUpload>
```
The function `onFileUpload` will have the `file` param which is the uploaded file object

```
onFileUpload=(file)=>{
// Call service to upload file
}
```

---
_Source: https://npm.io/package/simple-react-file-upload · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
