autoRefresh? | boolean | Enable auto-refresh on mutations (default: true) |
cacheDuration? | number | Cache duration in milliseconds (default: 60000 - 1 minute) |
libraryName | string | Name of the SharePoint library |
onAfterUpload? | (file, item) => void | Promise<void> | Callback after successful upload |
onBeforeUpload? | (file) => Promise<boolean | void> | Callback before upload |
onError? | (error) => void | Callback on error |
rootFolderPath? | string | Root folder path (optional) If not provided, the hook will automatically fetch the library's server-relative URL from SharePoint (e.g., '/sites/mysite/Shared Documents'). |
sp | SPFI | PnPjs SPFI instance (required) |