Plug 'n' Play Component - Upload file to TransferDog CDN from whatever (app) you want
npm install --save react-transferdog-uploader
To get your ApiKey, login on TransferDog.com , go to settings > apikeys , and setup your apikey !
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} />
}
}
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" |
MIT © frani