(
upload_id: str = Form(...),
chunk_index: str = Form(...),
chunk: UploadFile = File(...),
_auth: AuthContext = Depends(require_system_scope),
service: BackupService = Depends(get_service),
)
| 189 | |
| 190 | @router.post("/backups/upload/chunk") |
| 191 | async def upload_backup_chunk( |
| 192 | upload_id: str = Form(...), |
| 193 | chunk_index: str = Form(...), |
| 194 | chunk: UploadFile = File(...), |
| 195 | _auth: AuthContext = Depends(require_system_scope), |
| 196 | service: BackupService = Depends(get_service), |
| 197 | ): |
| 198 | return await _run( |
| 199 | lambda: service.upload_chunk( |
| 200 | upload_id=upload_id, |
| 201 | chunk_index_str=chunk_index, |
| 202 | chunk_file=chunk, |
| 203 | ), |
| 204 | prefix="上传分片失败", |
| 205 | ) |
| 206 | |
| 207 | |
| 208 | @legacy_router.post("/upload/chunk") |
nothing calls this directly
no test coverage detected