https://github.com/onface/react-fast-upload
https://github.com/onface/react-fast-upload
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/onface/react-fast-upload
- Owner: onface
- Created: 2016-10-31T07:36:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-20T10:01:24.000Z (about 8 years ago)
- Last Synced: 2025-04-14T00:11:24.680Z (about 1 month ago)
- Language: JavaScript
- Size: 369 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-fast-upload
> React Upload
[🔗 Live demo](https://fast-flow.github.io/react-fast-upload/)
[🕐 Releases](https://github.com/fast-flow/react-fast-upload/releases)[](https://travis-ci.org/fast-flow/react-fast-upload) [](https://npmjs.org/package/https://fast-flow.github.io/react-fast-upload/) [](https://npmjs.org/package/https://fast-flow.github.io/react-fast-upload/)
🌀 [Example](./example/) 🌀 [Doc](./doc/) 🌀 [Test](./test/)
## 📦 Install
```shell
npm i react-fast-upload --save
```## API
| name | type | default | description |
|------|------|------|------|
| action | String | | from action url |
| name | String | | file name |
| type | String | file | file type |
| data | object | | other data object to post |
| headers | object | | http headers to post, available in modern browsers |
| ~~multiple~~ | ~~Boolean~~ | ~~false~~ | ~~多文件, available in modern browsers~~ |
| clsp | String | rf | 更改原有样式classname前缀 |
| wrapClassName | String | | 自定义样式 |
| onStart | function | | start callback |
| onSuccess | function | | success callback |
| onProgress | function | | progress callback |
| onError | function | | error callback |## 📄 Usage
````js
var React = require('react')
var ReactDOM = require('react-dom')
var Some = require('react-fast-upload')
ReactDOM.render(, document.getElementById('demo'))
````## 🔨 development
```shell
npm i -g fis3 --registry=https://registry.npm.taobao.org
# Install dependencies | 安装依赖
npm run dep
# > Suggested Use `yarn` replace `npm run dep` | 建议使用 `yarn` 替代 `npm run dep`
# npm i -g yarn
# npm run yi# Server
npm run fs# Build
npm run dev# 构建 gh-pages 版本 到 output/
npm run gh
# 将 output/** 发布到 gh-pages 分支
npm run gh-push
# 构建 npm 要发布的代码到 output/
npm run npm
```Build based on [fast-boot](https://github.com/fast-flow/boot)
> For npm owner: npm publish Need to be in ./output