Huggingface.js documentation

Interface: CopyProgressEvent

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Interface: CopyProgressEvent

Progress events yielded by copyFileIter / copyFilesIter / copyFolderIter.

Currently only fileDownloaded is emitted: one event per source file that had to be downloaded (small git-stored files that can’t be copied server-side). Xet-backed files are copied server-side and do not produce events.

Properties

downloaded

downloaded: number

Number of files downloaded so far (including this one).

Defined in

packages/hub/src/lib/copy-files.ts:27


event

event: "fileDownloaded"

Defined in

packages/hub/src/lib/copy-files.ts:23


path

path: string

Source path of the file that was just downloaded.

Defined in

packages/hub/src/lib/copy-files.ts:25


total

total: number

Total number of files that will be downloaded.

Defined in

packages/hub/src/lib/copy-files.ts:29

Update on GitHub