v13

latestOpenAPI 3.1.02026-08-033122950.3 KB
models

Check upload method

Check if a file should be uploaded through the Large File mechanism or directly.

post/api/models/{namespace}/{repo}/preupload/{rev}

Path parameters

namespacestring required
repostring required
revstring required

Request body

gitAttributesstring

Provide this parameter if you plan to modify .gitattributes yourself at the same time as uploading LFS files. Note that this is not needed if you solely rely on automatic LFS detection from HF: the commit endpoint will automatically edit the .gitattributes file to track the files passed to its lfsFiles param.

gitIgnorestring

Content of the .gitignore file for the revision. Optional, otherwise takes the existing content of .gitignore for the revision.

Response

Files to be uploaded.

commitOidstring required