Open
Description
It would be great to support incremental uploads to avoid a temporary file creation in HfFileSystemFile._initiate_upload
and to be more aligned with fsspec
's philosophy (see huggingface/hffs#1 (comment))
When uploading a HfFileSystemFile
, the file contents are not known in advance, meaning we can't compute the file's sha
and size
, which are needed to fetch the upload mode or compute the number of parts in the multi-part upload mode on the moon-landing
side, etc.
Fixing this would probably require a new endpoint that accepts file contents in chunks, computes their GIT metadata, and writes them to a repo (as a regular or an LFS file).
(cc @julien-c @coyotte508)