Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@99xt/react-fileupload
Advanced tools
Readme
Simpler file upload implementation for react.js apps.
To install this library, run:
npm install @99xt/react-fileupload --save
example.component.js
import React, {Component} from 'react';
import FileUpload from '@99xt/react-fileupload';
class ExampleApp extends Component {
onUploadFiles(evt) {
if (evt.error) {
throw evt.error;
}
const files = evt.files;
// You can run upload script here
console.log(files);
}
render() {
const allowedTypes = [];
const allowedSize = 15; // MB
const multiple = true;
return (
<div>
<h1>react-fileupload Demo</h1>
{ /* with default UI */ }
<FileUpload
allowedTypes={ allowedTypes }
allowedSize={ allowedSize }
multiple={ multiple }
onUploadFiles={ this.onUploadFiles }
/>
{ /* with custom UI */ }
<FileUpload
allowedTypes={allowedTypes}
allowedSize={allowedSize}
multiple={multiple}
onUploadFiles={this.onUploadFiles}
renderUI={props => {
const { status } = props;
return (
<div style={{ border: "2px dashed #ccc", padding: "50px" }}>
<p>Click or drag n drop your file(s) here.</p>
<p>Drag n drop status: {status}</p>
</div>
);
}}
/>
</div>
);
}
}
Clone the repository to your workstation
git clone git@github.com:99xt/react-fileupload.git
Navigate to the project directory
cd react-fileupload
npm install
npm run build
Use npm run clean
for delete built resources.
npm start
Demo app will start on http://localhost:3000
Update the version in package.json
;
npm publish
MIT
FAQs
react-fileupload React component
The npm package @99xt/react-fileupload receives a total of 7 weekly downloads. As such, @99xt/react-fileupload popularity was classified as not popular.
We found that @99xt/react-fileupload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.