@rpldy/chunked-uploady
Installation
- npm
- Yarn
- pnpm
npm install @rpldy/chunked-uploady
yarn add @rpldy/chunked-uploady
pnpm add @rpldy/chunked-uploady
Details
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 (XHR) 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 instead.
Example
import ChunkedUploady from "@rpldy/chunked-uploady";
const App = () => (
<ChunkedUploady
chunkSize={5120000}
multiple
method="PUT"
destination={{ url: "https://my-server", headers: { "x-custom": "123" } }}>
<RestOfMyApp/>
</ChunkedUploady>
);
Exports
Plus all the exports from uploady