Hiyve Components - v1.0.0
    Preparing search index...
    • FileCacheProvider manages the file system cache for Hiyve rooms.

      Parameters

      Returns Element

      Supports two modes:

      Room mode (default): Must be placed inside a HiyveProvider. Automatically initializes the file cache when a room is joined and disposes on leave.

      Library mode: When the files prop is provided, works standalone without HiyveProvider. Derives the file tree from the flat file list and delegates operations to the on* callback props.

      <HiyveProvider generateRoomToken={getToken}>
      <FileCacheProvider>
      <FileManager />
      </FileCacheProvider>
      </HiyveProvider>
      <FileCacheProvider
      files={userFiles}
      onDeleteFile={handleDelete}
      onUploadFile={handleUpload}
      onGetFileUrl={handleGetUrl}
      onRefresh={handleRefresh}
      >
      <FileManager />
      </FileCacheProvider>