Skip to main content

useBatchAbortListener

Package​

@rpldy/uploady

Installation​

npm install @rpldy/uploady

Details​

type useBatchAbortListener = BatchEventHook;
note

Event Hook - BATCH-ABORT

Called in case abort batch was called on the context or on the uploader.

info

This event can be scoped to a specific batch by passing the batch id as a second parameter

Example​

import { useBatchAbortListener } from "@rpldy/uploady";

const MyComponent = () => {
useBatchAbortListener((batch) => {
console.log(`batch ${batch.id} was aborted`);
});

//...
};