1.0.1 • Published 4 years ago

react-transferdog-uploader v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

react-transferdog-uploader

Plug 'n' Play Component - Upload file to TransferDog CDN from whatever (app) you want

NPM JavaScript Style Guide

Install

npm install --save react-transferdog-uploader

ApiKey

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

PropData TypeRequiredDescription
apikeystringYESnecessary to work with TD API
onSucesscallbackNoreturn object with url files
onFailcallbackNoreturn eerror message if uploader fail
handleSubmitcallbackNoIn case you want to handle Upload from outside of component
colorBorderstring - HEXNoHexagecimal color
colorTextstring - HEXNoHexagecimal color
colorIconstring - HEXNoHexagecimal color
textBoxstring - HEXNomessage on box, default is "Drag 'n' drop your files"
textButtonstring - HEXNomessage on Upload button, default is, well, "Upload"
textSuccessstring - HEXNomessage after file are uploaded, default is "Files Uploaded"

License

MIT © frani