useBatchFinalizeListener
Packageβ
Installationβ
- npm
- Yarn
- pnpm
npm install @rpldy/uploady
yarn add @rpldy/uploady
pnpm add @rpldy/uploady
Detailsβ
type useBatchFinalizeListener = BatchEventHook;
- See: BatchEventHook
- See: Batch Entity
note
Event Hook - BATCH-FINALIZE
Called for batch when all its items have finished uploading or in case the batch was cancelled(abort) or had an error
info
This event can be scoped to a specific batch by passing the batch id as a second parameter
Exampleβ
import { useBatchFinalizeListener } from "@rpldy/uploady";
const MyComponent = () => {
useBatchFinalizeListener((batch, options) => {
console.log(`batch ${batch.id} finished uploading with status: ${batch.state}`);
});
//...
};