Hiyve Components - v1.0.0
    Preparing search index...
    • Decide what to save for one file: a handler's conversion when one claims the file and succeeds, otherwise the stored file itself.

      A handler that throws or declines never costs the user their download — the stored file is the fallback in both cases. onError reports the throw so a consumer can log it.

      Parameters

      • opts: {
            file: FileEntry;
            getFileUrl: (file: FileEntry) => Promise<string | null>;
            handlers?: DownloadHandler[];
            onError?: (handlerName: string, error: unknown) => void;
            signal?: AbortSignal;
        }

      Returns Promise<DownloadTarget | undefined>