useItemErrorListener
Packageβ
Installationβ
- npm
- Yarn
- pnpm
npm install @rpldy/uploady
yarn add @rpldy/uploady
pnpm add @rpldy/uploady
Detailsβ
type useItemErrorListener = ItemEventHook;
- See: ItemEventHook
- See: BatchItem Entity
note
Event Hook - ITEM-ERROR
Called in case item upload failed
info
This event can be scoped to a specific item by passing the item id as a second parameter
Exampleβ
import { useItemErrorListener } from "@rpldy/uploady";
const MyComponent = () => {
useItemErrorListener((item, options) => {
console.log(`item ${item.id} failed - `, item.uploadResponse);
});
//...
};