react-transferdog-uploader

1.0.1 • Public • Published

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

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-transferdog-uploader

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

201 kB

Total Files

7

Last publish

Collaborators

  • frani