Skip to main content

useBatchFinalizeListener

Package​

@rpldy/uploady

Installation​

npm install @rpldy/uploady

Details​

type useBatchFinalizeListener = BatchEventHook;
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}`);
});

//...
};