Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@rpldy/chunked-uploady
Advanced tools
Changelog
Readme
This package is provided as a convenient alternative to the main Uploady package. To be used in case chunked upload is required.
The server that is accepting the upload must also support chunked uploads. The original file is broken down into smaller blobs, which are sent in different requests. Each request is sent with the Content-Range header to specify the bytes range.
Internally, ChunkedUploady uses @rpldy/chunked-sender instead of the default sender.
Chunked-Sender, doesn't support grouped uploads (see Upload Options documentation) or URL uploading. These will be handed over to the default @rpldy/sender.
In case the browser doesn't support chunking (blob slicing), the default sender will be used as well.
The best place to get started is at our: React-Uploady Documentation Website
#Yarn:
$ yarn add @rpldy/chunked-uploady
#NPM:
$ npm i @rpldy/chunked-uploady
Note that you don't need @rpldy/uploady, it comes with.
Name (* = mandatory) | Type | Default | Description |
---|---|---|---|
chunked | boolean | true | chunk uploads. setting to false will return to default sending behavior |
chunkSize | number | 5242880 | the chunk size. relevant when uploaded file is larger than the value |
retries | number | 0 | how many times to retry sending a failed chunk |
parallel | number | 0 | how many (chunk) requests to send simultaneously |
In addition, all UploadOptions props can be passed to ChunkedUploady. In order to override configuration passed to the parent Uploady component. See Uploady documentation for detailed list of upload options.
Chunked Uploady provides hooks for chunk life-time events:
Called when a chunk is about to be sent to the server
This event is cancellable
import { useChunkStartListener } from "@rpldy/chunked-uploady";
const MyComponent = () => {
useChunkStartListener((data) => {
return {
url: `${data.url}/${data.chunk.index}`
};
});
};
Called when a chunk has finished uploading
import { useChunkFinishListener } from "@rpldy/chunked-uploady";
const MyComponent = () => {
useChunkFinishListener(({ chunk }) => {
console.log(`Chunk Finished - ${chunk.id} - attempt: ${chunk.attempt}`);
});
};
FAQs
wrapper&context component to expose and provide react-uploady functionality with chunked upload support
The npm package @rpldy/chunked-uploady receives a total of 1,144 weekly downloads. As such, @rpldy/chunked-uploady popularity was classified as popular.
We found that @rpldy/chunked-uploady 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.