Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/die-welle/tiny-qiniu-request
tiny-qiniu for rc-upload or antd upload component `customRequest` property
https://github.com/die-welle/tiny-qiniu-request
ant-design antd qiniu rc-upload react request tiny-qiniu upload upload-file
Last synced: about 1 month ago
JSON representation
tiny-qiniu for rc-upload or antd upload component `customRequest` property
- Host: GitHub
- URL: https://github.com/die-welle/tiny-qiniu-request
- Owner: die-welle
- License: mit
- Created: 2017-05-14T09:19:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-05T11:06:06.000Z (over 7 years ago)
- Last Synced: 2023-12-27T15:04:36.297Z (almost 1 year ago)
- Topics: ant-design, antd, qiniu, rc-upload, react, request, tiny-qiniu, upload, upload-file
- Language: JavaScript
- Size: 17.6 KB
- Stars: 13
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# tiny-qiniu-request
tiny-qiniu for [rc-upload](https://github.com/react-component/upload/blob/master/README.md#customrequest) or [antd upload component](https://ant.design/components/upload/#customRequest) `customRequest` property.
## Installation
```bash
yarn add tiny-qiniu tiny-qiniu-request
```## Usage
`tiny-qiniu-request` should work together with [rc-upload](https://github.com/react-component/upload/blob/master/README.md) or [antd upload component](https://ant.design/components/upload/)
```js
import React, { Component } from 'react';
import { Upload } from 'antd';
import tinyQiniuRequest from 'tiny-qiniu-request';const request = tinyQiniuRequest({
name: 'my_bucket', // qiniu bucket name, requried
domain: 'http://cdn.awesome.com', // qiniu bucket domain, requried
uptokenUrl: 'http://localhost/api/uptoken',
});export default class MyUpload extends {
render() {
}
}
```##### Signature
`tinyQiniuRequest(option)`
The `option` usage is the same with [tiny-qiniu constructor option](https://github.com/die-welle/tiny-qiniu#tinyqiniuconstructoroptions)
## Related Projects
- [tiny-qiniu](https://github.com/die-welle/tiny-qiniu)
## License
MIT