
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@mux/mux-uploader-react
Advanced tools
An uploader element for React that handles Mux Direct Uploads and a visual progress bar for you
<MuxUploader></MuxUploader>
is React component for uploading files to Mux.
MuxUploaderDrop
is an optional supporting React component for drop-in drag and drop and overlay. You can always configure your own drag and drop with MuxUploader
.
If you are looking for a direct upload interface and a progress bar, you're in the right place.
If you're using npm
or yarn
, install that way:
yarn add @mux/mux-uploader-react
or
npm i @mux/mux-uploader-react
Then, import the library into your application with either import
or require
:
import '@mux/mux-uploader-react';
or
require('@mux/mux-uploader-react');
const MuxUploaderWithMuxUploaderDropExample = () => {
return (
<div>
<h1>Simple MuxUploader and Mux Uploader Drop Examples</h1>
{/* Upload button by itself with default drag an drop scoped to the space it takes up. Displays upload progress in text as percentage. */}
<MuxUploader url="authenticated-url" type="bar" status></MuxUploader>
{/* Upload button by itself with drag an drop disabled. Does not display text percentage. */}
<MuxUploader url="authenticated-url" type="bar" disableDrop></MuxUploader>
{/* Upload button with access to additional drag and drop features via slots i.e. fullscreen drag and drop with text overlay (work-in-progress). */}
<MuxUploader url="authenticated-url">
<MuxUploaderDrop slot="dropzone" text="Upload to stream.new" fullscreen overlay></MuxUploaderDrop>
</MuxUploader>
</div>
);
};
MuxUploader
Attribute | Type | Description | Default |
---|---|---|---|
url | string | The authenticated URL that your file will be uploaded to. Check out the direct uploads docs for how to create one. Required. | undefined |
id | string | An ID that allows MuxUploaderDrop to locate MuxUploader . Not necessary unless the unlikely scenario you need to nest MuxUploader inside MuxUploaderDrop . | N/A |
type | "bar" | Specifies the visual type of progress bar. A radial type is in-progress. | "bar" |
uploadInProgress | boolean | Toggles visual status of progress bar while upload is in progress. | false |
uploadError | boolean | Toggles visual status of progress bar when upload encounters an error. | false |
status | boolean | Toggles text status visibility of progress bar. The text that is displayed is a percentage by default. If you prefer just the progress bar with no text upload status, don't include this attribute. | false |
MuxUploaderDrop
Attribute | Type | Description | Default |
---|---|---|---|
fullscreen | boolean | Toggles fullscreen drag and drop (work-in-progress). | false |
overlay | boolean | Toggles fullscreen overlay on dragover. | false |
disableDrop | boolean | Toggles off drag and drop which is enabled by default. | false |
Method | Description |
---|---|
handleUpload() | Begins upload of the media. |
FAQs
An uploader element for React that handles Mux Direct Uploads and a visual progress bar for you
The npm package @mux/mux-uploader-react receives a total of 8,568 weekly downloads. As such, @mux/mux-uploader-react popularity was classified as popular.
We found that @mux/mux-uploader-react demonstrated a healthy version release cadence and project activity because the last version was released less than 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.