react-dropit
v1.0.22
Published
Uploading files is now easier :))
Downloads
62
Maintainers
Readme
React Drop It
Getting Started
- Easy to upload your files with drag-drop
- Default style, or you can style it
Demo
Features next version
- support auto-resize, reduce quality
- Support thumbnail for video
Insallting
yarn add react-dropit
or
npm i --save react-dropit
Usage
import DropIt from 'react-dropit
// const DropIt from 'react-dropit'
const ImageUpload = (props) => {
const ImgThumb = props.CustomThumbnail
return (
<DropIt
onChange={props.onChange}
value={props.value}
type='image'
errorSizeMsg="Max file size is 1MB"
errorTypeMsg="Just image!!!"
errorMaxFilesMsg="You just can upload 10 files"
multiple={props.multiple}
autoUpload
uploadUrl="/upload"
maxFiles={10}
className="classname-for-react-dropit-container"
dropzoneClassName="classname-for-drop-zone"
thumbnailContainerClassName="classname-for-thumbnail-list-container"
thumbnail={ImgThumb}
thumbnailClassName="classname-for-thumbnail-item"
placeholder="Drop or click here to upload images"/>
)
}