
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
@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
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.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.