f08cffc0e8
- Add docs/ with VitePress site (19 pages): guide, config, architecture, FAQ - Add GitHub Actions workflow for auto-deploy to GitHub Pages - Replace music 'Add Tracks' upload picker with in-app audio file browser modal - Add music picker CSS styles with dark theme support - Add missing i18n keys (search_audio, no_audio_files, etc.) to all 14 locales - Optimize Dockerfile: shared base stage, COPY --chmod, consolidated RUN, HEALTHCHECK - Improve README: docs links, updated stats (222+ tests, 14 languages), feature status
1.5 KiB
1.5 KiB
Chunked Uploads
OxiCloud supports TUS-like chunked uploads for large files. Uploads are parallel, resumable, and have MD5 integrity checks.
How It Works
- Client sends
POST /api/files/upload/initwith file metadata → receives anupload_id - Client splits the file into chunks and uploads them in parallel via
POST /api/files/upload/chunk - Each chunk includes its index, MD5 hash, and the
upload_id - When all chunks are uploaded, client calls
POST /api/files/upload/complete - Server reassembles the file, verifies integrity, and runs deduplication
API Endpoints
Initialize Upload
POST /api/files/upload/init
Content-Type: application/json
{
"file_name": "large-video.mp4",
"folder_id": "folder-uuid",
"total_size": 524288000,
"chunk_size": 8388608,
"total_chunks": 63
}
Upload Chunk
POST /api/files/upload/chunk
Content-Type: multipart/form-data
upload_id: "uuid"
chunk_index: 0
chunk_hash: "md5-hex"
file: <binary>
Complete Upload
POST /api/files/upload/complete
Content-Type: application/json
{
"upload_id": "uuid"
}
Configuration
| Parameter | Default | Description |
|---|---|---|
| Max parallel chunks | 8 | Concurrent chunk uploads |
| Min size for chunking | 200 MB | Below this, single-shot upload is used |
| Chunk size | 8 MB | Default chunk size |
Frontend Behaviour
The OxiCloud web UI automatically selects chunked upload for large files. A progress bar shows overall completion and current chunk status.