Installations
npm install react-filepond
Developer
Developer Guide
Module System
CommonJS, UMD
Min. Node Version
Typescript Support
Yes
Node Version
16.10.0
NPM Version
7.24.0
Statistics
1,868 Stars
111 Commits
91 Forks
16 Watching
9 Branches
8 Contributors
Updated on 26 Nov 2024
Bundle Size
2.82 kB
Minified
1.27 kB
Minified + Gzipped
Languages
JavaScript (85.86%)
HTML (11.85%)
CSS (2.29%)
Total Downloads
Cumulative downloads
Total Downloads
7,623,140
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
React FilePond
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
Core Features
- Accepts directories, files, blobs, local URLs, remote URLs and Data URIs.
- Drop files, select on filesystem, copy and paste files, or add files using the API.
- Async uploading with AJAX, or encode files as base64 data and send along form post.
- Accessible, tested with AT software like VoiceOver and JAWS, navigable by Keyboard.
- Image optimization, automatic image resizing, cropping, and fixes EXIF orientation.
- Responsive, automatically scales to available space, is functional on both mobile and desktop devices.
Also need Image Editing?
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.
Installation
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
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 8 are checked with a SAST tool
Reason
40 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
Score
1.9
/10
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