@rpldy/tus-uploady
Installation
- npm
- Yarn
- pnpm
npm install @rpldy/tus-uploady
yarn add @rpldy/tus-uploady
pnpm add @rpldy/tus-uploady
Details
This package is provided as a convenient alternative to the main Uploady package. To be used in case resumable (tus) upload is required.
Internally, TusUploady uses @rpldy/tus-sender instead of the default (XHR) sender.
TUS Protocol
On top of the Core Protocol, Uploady supports the following extensions:
- Creation (creation)
- Creation with Upload (creation-with-upload)
- Concatenation (concatenation)
- Creation Defer Length (creation-defer-length)
It also supports the Upload-Metadata header and will turn the destination params prop into the metadata key/value.
Example
TUS - Simple Example
import React from "react";
import TusUploady from "@rpldy/tus-uploady";
import UploadButton from "@rpldy/upload-button";
const App = () => (<TusUploady
destination={{ url: "https://my-tus-server/upload" }}
chunkSize={2142880}
sendDataOnCreate
>
<UploadButton/>
</TusUploady>);
Exports
info
Plus all the exports from uploady