-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for files endpoints #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive file operations functionality to the HuggingFace SDK, enabling upload, download, listing, and deletion of files in Hugging Face repositories.
- Implements file upload with automatic streaming for large files (>10MB)
- Adds file download with progress tracking and resume capability
- Provides file existence checking, listing, and metadata retrieval
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/HuggingFace/Hub/HubClient+Files.swift | Core file operations implementation including upload, download, delete, and query operations |
| Sources/HuggingFace/Hub/File.swift | Data structures for file metadata and batch upload operations |
| Sources/HuggingFace/Shared/MultipartBuilder.swift | Multipart form-data builder supporting both in-memory and streaming approaches |
| Sources/HuggingFace/Shared/HTTPClient.swift | Added HEAD method support and made helper methods public for file operations |
| Tests/HuggingFaceTests/HubTests/FileOperationsTests.swift | Comprehensive test coverage for all file operations |
| README.md | Documentation and usage examples for new file operations API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.