Gathering detailed insights and metrics for react-filepond
Gathering detailed insights and metrics for react-filepond
Gathering detailed insights and metrics for react-filepond
Gathering detailed insights and metrics for react-filepond
npm install react-filepond
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,868 Stars
111 Commits
91 Forks
16 Watching
9 Branches
8 Contributors
Updated on 26 Nov 2024
Minified
Minified + Gzipped
JavaScript (85.86%)
HTML (11.85%)
CSS (2.29%)
Cumulative downloads
Total Downloads
Last day
7.4%
10,608
Compared to previous day
Last week
6.7%
53,399
Compared to previous week
Last month
8.4%
219,699
Compared to previous month
Last year
39.3%
2,270,803
Compared to previous year
React FilePond is a handy wrapper component for FilePond, a JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.
Buy me a Coffee / Use FilePond with Pintura / Dev updates on Twitter
Pintura the modern JavaScript Image Editor is what you're looking for. Pintura supports setting crop aspect ratios, resizing, rotating, cropping, and flipping images. Above all, it integrates beautifully with FilePond.
1npm install react-filepond filepond --save
Hooks:
1import React, { useState } from 'react' 2import ReactDOM from 'react-dom' 3 4// Import React FilePond 5import { FilePond, registerPlugin } from 'react-filepond' 6 7// Import FilePond styles 8import 'filepond/dist/filepond.min.css' 9 10// Import the Image EXIF Orientation and Image Preview plugins 11// Note: These need to be installed separately 12// `npm i filepond-plugin-image-preview filepond-plugin-image-exif-orientation --save` 13import FilePondPluginImageExifOrientation from 'filepond-plugin-image-exif-orientation' 14import FilePondPluginImagePreview from 'filepond-plugin-image-preview' 15import 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css' 16 17// Register the plugins 18registerPlugin(FilePondPluginImageExifOrientation, FilePondPluginImagePreview) 19 20// Our app 21function App() { 22 const [files, setFiles] = useState([]) 23 return ( 24 <div className="App"> 25 <FilePond 26 files={files} 27 onupdatefiles={setFiles} 28 allowMultiple={true} 29 maxFiles={3} 30 server="/api" 31 name="files" /* sets the file input name, it's filepond by default */ 32 labelIdle='Drag & Drop your files or <span class="filepond--label-action">Browse</span>' 33 /> 34 </div> 35 ) 36}
Component:
1import React, { useState } from 'react' 2import ReactDOM from 'react-dom' 3 4// Import React FilePond 5import { FilePond, registerPlugin } from "react-filepond"; 6 7// Import FilePond styles 8import "filepond/dist/filepond.min.css"; 9 10// Import the Image EXIF Orientation and Image Preview plugins 11// Note: These need to be installed separately 12import FilePondPluginImageExifOrientation from "filepond-plugin-image-exif-orientation"; 13import FilePondPluginImagePreview from "filepond-plugin-image-preview"; 14import "filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css"; 15 16// Register the plugins 17registerPlugin(FilePondPluginImageExifOrientation, FilePondPluginImagePreview); 18 19// Our app 20class App extends Component { 21 constructor(props) { 22 super(props); 23 24 this.state = { 25 // Set initial files, type 'local' means this is a file 26 // that has already been uploaded to the server (see docs) 27 files: [ 28 { 29 source: "index.html", 30 options: { 31 type: "local" 32 } 33 } 34 ] 35 }; 36 } 37 38 handleInit() { 39 console.log("FilePond instance has initialised", this.pond); 40 } 41 42 render() { 43 return ( 44 <div className="App"> 45 <FilePond 46 ref={ref => (this.pond = ref)} 47 files={this.state.files} 48 allowMultiple={true} 49 allowReorder={true} 50 maxFiles={3} 51 server="/api" 52 name="files" /* sets the file input name, it's filepond by default */ 53 oninit={() => this.handleInit()} 54 onupdatefiles={fileItems => { 55 // Set currently active file objects to this.state 56 this.setState({ 57 files: fileItems.map(fileItem => fileItem.file) 58 }); 59 }} 60 /> 61 </div> 62 ); 63 } 64} 65
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 4/26 approved changesets -- score normalized to 1
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
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
40 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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