Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@99xt/react-fileupload
Advanced tools
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 13 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.