Skip to main content

useItemErrorListener

Package​

@rpldy/uploady

Installation​

npm install @rpldy/uploady

Details​

type useItemErrorListener = ItemEventHook;
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);
});

//...
};