feat: update chunked upload endpoints and enhance upload resilience with improved logging and HMAC validation

This commit is contained in:
2025-07-17 19:09:22 +02:00
parent 59679edbce
commit dc88f9f6fb
18 changed files with 181 additions and 43 deletions

View File

@ -55,9 +55,9 @@ The network resilience features have been successfully implemented and are ready
| Endpoint | Method | Purpose |
|----------|--------|---------|
| `/upload/chunked` | POST | Start new chunked upload session |
| `/upload/chunked` | PUT | Upload individual chunks |
| `/upload/status` | GET | Check upload progress |
| `/chunked-upload` | POST | Start new chunked upload session |
| `/chunked-upload` | PUT | Upload individual chunks |
| `/upload-status` | GET | Check upload progress |
| `/upload` | POST | Traditional uploads (unchanged) |
## 📱 Network Switching Benefits
@ -89,17 +89,17 @@ curl -X POST \
-H "X-Filename: large_video.mp4" \
-H "X-Total-Size: 104857600" \
-H "X-Signature: HMAC" \
http://localhost:8080/upload/chunked
http://localhost:8080/chunked-upload
# 2. Upload chunks (automatically handles network switches)
curl -X PUT \
-H "X-Upload-Session-ID: session_123" \
-H "X-Chunk-Number: 0" \
--data-binary @chunk_0.bin \
http://localhost:8080/upload/chunked
http://localhost:8080/chunked-upload
# 3. Check progress
curl "http://localhost:8080/upload/status?session_id=session_123"
curl "http://localhost:8080/upload-status?session_id=session_123"
```
## ⚙️ Configuration