1.0.1 • Published 5 years ago
react-transferdog-uploader v1.0.1
react-transferdog-uploader
Plug 'n' Play Component - Upload file to TransferDog CDN from whatever (app) you want
Install
npm install --save react-transferdog-uploaderApiKey
To get your ApiKey, login on TransferDog.com , go to settings > apikeys , and setup your apikey !
Usage
import React, { Component } from 'react'
import TDU from 'react-transferdog-uploader'
import 'react-transferdog-uploader/dist/index.css'
class Example extends Component {
render() {
return <TDU apikey={yourApiKey} />
}
}Props
| Prop | Data Type | Required | Description |
|---|---|---|---|
| apikey | string | YES | necessary to work with TD API |
| onSucess | callback | No | return object with url files |
| onFail | callback | No | return eerror message if uploader fail |
| handleSubmit | callback | No | In case you want to handle Upload from outside of component |
| colorBorder | string - HEX | No | Hexagecimal color |
| colorText | string - HEX | No | Hexagecimal color |
| colorIcon | string - HEX | No | Hexagecimal color |
| textBox | string - HEX | No | message on box, default is "Drag 'n' drop your files" |
| textButton | string - HEX | No | message on Upload button, default is, well, "Upload" |
| textSuccess | string - HEX | No | message after file are uploaded, default is "Files Uploaded" |
License
MIT © frani