Skip to main content

ISharePointDocumentManagerConfig

@spartanfx/react v1.2.2


@spartanfx/react / spfx / ISharePointDocumentManagerConfig

Interface: ISharePointDocumentManagerConfig

Configuration for SharePoint Document Manager

Properties

Required

PropertyTypeDescription
libraryNamestringName of the SharePoint library
spSPFIPnPjs SPFI instance (required)

Options

PropertyTypeDescription
autoRefresh?booleanEnable auto-refresh on mutations (default: true)
cacheDuration?numberCache duration in milliseconds (default: 60000 - 1 minute)
rootFolderPath?stringRoot 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').

Events & callbacks

PropertyTypeDescription
onAfterUpload?(file, item) => void | Promise<void>Callback after successful upload
onBeforeUpload?(file) => Promise<boolean | void>Callback before upload
onError?(error) => voidCallback on error