2.0.8 • Published 2 years ago

kodobe-react-upload v2.0.8

Weekly downloads
6
License
ISC
Repository
-
Last release
2 years ago

Kodobe React Upload

This is a simple react upload package, it can also be extended to be a file dragger.

Install

npm install kodobe-react-upload

or

yarn add kodobe-react-upload

Setup

import Upload from 'kodobe-react-upload';

Usage

import Upload from "kodobe-react-upload";

function App() {
    return (
        <div>
            <h3>Here is how to use a upload</h3>
             <br />
            <Upload
                onChange={(e) => console.log(e)}
                uploadUrl="https://api.devtot.com/message/file-upload"
                fileName="file_upload"
            />
        </div>
    );
}

Options

  • children: Any thing, Upload becomes standalone if empty
  • maxSize: maxSize file can be (number)
  • uploadUrl: (string)
  • fileName: upload file name (string)
  • title: upload button title (string)
  • headers: provide headers if required (objects)
  • onChange: view progress of file as it uploads (function)
  • dragger: turns upload to a file dragger and allows multiple uploads (boolean, default=false)
  • maxUpload: maximum file the dragger can take (number, default=10)
2.0.7

2 years ago

2.0.8

2 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.6

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago