- Add uploadSingleChunkToDiscord function with rate limit handling
- Add uploadChunkToDiscordWithRetry with 429 retry support
- Add mergeDiscordChunksInfo for chunk metadata assembly
- Add handleDiscordChunkedFile for streaming download
- Add fetchDiscordChunkWithRetry for reliable chunk fetching
- Discord uses 9MB chunks (vs 10MB for others) for safety margin
- Support Range requests for video seeking
- Support proxy URL for Discord CDN
- Fix commitUpload missing url parameter for endUpload
- Implement incremental SHA256 hash algorithm for large files
- Use 4MB chunks for SHA256 calculation to reduce memory pressure
- Support files of any size without memory overflow
- Add frontend direct upload to HuggingFace S3, bypassing CF Workers limits
- Add /api/huggingface/getUploadUrl endpoint to get LFS upload URLs
- Add /api/huggingface/commitUpload endpoint to commit file references
- Support multipart upload for very large files
- SHA256 computed in frontend to avoid CF Workers CPU timeout
- Small files (<20MB) still use proxy upload through CF Workers
- Add HuggingFace API wrapper class (huggingfaceAPI.js)
- Support upload, download, delete operations via HuggingFace Hub API
- Support public repos (unlimited storage) and private repos (100GB limit)
- Private repos: server proxies requests with Authorization header
- Auto-create repo if not exists (with write token)
- Add HuggingFace to auto-retry channel list
- Environment variables: HF_TOKEN, HF_REPO, HF_PRIVATE
- Support load balancing for multiple HuggingFace channels
- Add quota counter tracking (usedMB, fileCount) per channel
- Filter channels by quota threshold in fetchUploadConfig()
- Update quota on upload (endUpload) and delete
- Add /api/manage/quota API for stats and recalculation
- Fix null check in delete when file record not found
- Fix R2 channel name from hardcoded to actual channel.name