Gathering detailed insights and metrics for material-ui-dropzone
Gathering detailed insights and metrics for material-ui-dropzone
Gathering detailed insights and metrics for material-ui-dropzone
Gathering detailed insights and metrics for material-ui-dropzone
npm install material-ui-dropzone
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
484 Stars
437 Commits
247 Forks
7 Watching
21 Branches
42 Contributors
Updated on 19 Oct 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-24.5%
6,456
Compared to previous day
Last week
-5.4%
34,243
Compared to previous week
Last month
8.2%
163,050
Compared to previous month
Last year
-8.2%
2,103,271
Compared to previous year
3
5
30
Material-UI-dropzone is a React component using Material-UI and is based on the excellent react-dropzone library.
This components provide either a file-upload dropzone or a file-upload dropzone inside of a dialog.
The file-upload dropzone features some snazzy "File Allowed/Not Allowed" effects, previews and alerts.
1npm install --save material-ui-dropzone
or
1yarn add material-ui-dropzone
material-ui-dropzone
complies to the following support matrix.
version | React | Material-UI |
---|---|---|
3.x | 16.8+ | 4.x |
2.x | 15.x or 16.x | 3.x or 4.x |
This is the Dialog component:
When you drag a file onto the dropzone, you get a neat effect:
And if you drag in a wrong type of file, you'll get yelled at:
N.B. This has some limitations (see here for more details).
See https://yuvaleros.github.io/material-ui-dropzone for Documentation and Examples.
This components creates the dropzone, previews and snackbar notifications without a dialog
1import React, {Component} from 'react' 2import {DropzoneArea} from 'material-ui-dropzone' 3 4class DropzoneAreaExample extends Component{ 5 constructor(props){ 6 super(props); 7 this.state = { 8 files: [] 9 }; 10 } 11 handleChange(files){ 12 this.setState({ 13 files: files 14 }); 15 } 16 render(){ 17 return ( 18 <DropzoneArea 19 onChange={this.handleChange.bind(this)} 20 /> 21 ) 22 } 23} 24 25export default DropzoneAreaExample;
This component provides the DropzoneArea inside of a MaterialUI Dialog.
1import React, { Component } from 'react' 2import {DropzoneDialog} from 'material-ui-dropzone' 3import Button from '@mui/material/Button'; 4 5export default class DropzoneDialogExample extends Component { 6 constructor(props) { 7 super(props); 8 this.state = { 9 open: false, 10 files: [] 11 }; 12 } 13 14 handleClose() { 15 this.setState({ 16 open: false 17 }); 18 } 19 20 handleSave(files) { 21 //Saving files to state for further use and closing Modal. 22 this.setState({ 23 files: files, 24 open: false 25 }); 26 } 27 28 handleOpen() { 29 this.setState({ 30 open: true, 31 }); 32 } 33 34 render() { 35 return ( 36 <div> 37 <Button onClick={this.handleOpen.bind(this)}> 38 Add Image 39 </Button> 40 <DropzoneDialog 41 open={this.state.open} 42 onSave={this.handleSave.bind(this)} 43 acceptedFiles={['image/jpeg', 'image/png', 'image/bmp']} 44 showPreviews={true} 45 maxFileSize={5000000} 46 onClose={this.handleClose.bind(this)} 47 /> 48 </div> 49 ); 50 } 51}
MIT
Thanks goes to these wonderful people (emoji key):
Yuvaleros 🤔 💻 🎨 📖 💬 👀 🚧 | Mattia Panzeri 🤔 💻 🎨 📖 💡 🚇 🐛 💬 👀 🚧 | Max Carroll 🤔 💻 🎨 💡 👀 |
Matthew Corner 🐛 🤔 💻 | Barry Loong 🤔 💻 | JF Blouin 🤔 💻 |
Anthony Raymond 💻 💡 | isaacbuckman 🐛 💻 💡 | MatthijsMud 🐛 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 4/20 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
82 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More