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

Function upload_backup

astrbot/dashboard/api/backups.py:149–154  ·  view source on GitHub ↗
(
    file: UploadFile = File(...),
    _auth: AuthContext = Depends(require_system_scope),
    service: BackupService = Depends(get_service),
)

Source from the content-addressed store, hash-verified

147
148@router.post("/backups/upload")
149async def upload_backup(
150 file: UploadFile = File(...),
151 _auth: AuthContext = Depends(require_system_scope),
152 service: BackupService = Depends(get_service),
153):
154 return await _run(lambda: service.upload_backup(file), prefix="上传备份文件失败")
155
156
157@legacy_router.post("/upload")

Callers

nothing calls this directly

Calls 3

FileClass · 0.85
upload_backupMethod · 0.80
_runFunction · 0.70

Tested by

no test coverage detected