useChunkFinishListener
Packageβ
Installationβ
- npm
- Yarn
- pnpm
npm install @rpldy/chunked-uploady
yarn add @rpldy/chunked-uploady
pnpm add @rpldy/chunked-uploady
Detailsβ
type useChunkFinishListener = (cb: (data: ChunkFinishEventData) => void) => void;
- See: ChunkFinishEventData
note
Event Hook - CHUNK_FINISH
Called when a chunk finishes uploading as part of a chunked upload
Exampleβ
import { useChunkFinishListener } from "@rpldy/chunked-uploady";
const MyComponent = () => {
useChunkFinishListener(({ chunk }) => {
console.log(`Chunk Finished - ${chunk.id} - attempt: ${chunk.attempt}`);
});
};