
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
react-simple-file-input
Advanced tools
Simple wrapper for the HTML input tag and HTML5 FileReader API
react-simple-file-input expects a readAs option to indicate how the file should be read. Valid options are:
react-simple-file-input supports the following event handlers:
Each receives the native event as the first argument, and the selected file object as the second.
All children passed to react-simple-file-input will be nested so when they are clicked the browser's file selection window opens.
var FileInput = require('react-simple-file-input');
var Component = React.createClass({
render: function(){
return(
<div>
To upload a file:
<FileInput
readAs='binary'
onLoadStart={this.showProgressBar}
onLoad={this.handleFileSelected}
onProgress={this.updateProgressBar}
>
Click Here
</FileInput>
</div>
);
},
showProgressBar: function(){
this.setState({ progressBarVisible: true});
},
updateProgressBar: function(event){
this.setState({
progressPercent: (event.loaded / event.total) * 100
});
},
handleFileSelected: function(event, file){
this.setState({file: file, fileContents: event.target.result});
}
});
FAQs
Simple wrapper for the HTML input tag and HTML5 FileReader API
The npm package react-simple-file-input receives a total of 15,332 weekly downloads. As such, react-simple-file-input popularity was classified as popular.
We found that react-simple-file-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.