MCPcopy
hub / github.com/AstrBotDevs/AstrBot / upload_backup_chunk

Function upload_backup_chunk

astrbot/dashboard/api/backups.py:191–205  ·  view source on GitHub ↗
(
    upload_id: str = Form(...),
    chunk_index: str = Form(...),
    chunk: UploadFile = File(...),
    _auth: AuthContext = Depends(require_system_scope),
    service: BackupService = Depends(get_service),
)

Source from the content-addressed store, hash-verified

189
190@router.post("/backups/upload/chunk")
191async 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")

Callers

nothing calls this directly

Calls 3

FileClass · 0.85
upload_chunkMethod · 0.80
_runFunction · 0.70

Tested by

no test coverage detected