From 110cc8736c519e26f7d5b20148937465b778e5b9 Mon Sep 17 00:00:00 2001 From: Lovely Moe Moli <44719954+moemoli@users.noreply.github.com> Date: Fri, 26 Jun 2026 22:04:29 +0800 Subject: [PATCH] fix: 'DashboardRequest' object has no attribute 'get_data' (#9021) (#9023) --- astrbot/dashboard/asgi_runtime.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/astrbot/dashboard/asgi_runtime.py b/astrbot/dashboard/asgi_runtime.py index b2dbef020..7a46b4527 100644 --- a/astrbot/dashboard/asgi_runtime.py +++ b/astrbot/dashboard/asgi_runtime.py @@ -193,6 +193,14 @@ class DashboardRequest: assert self._files_cache is not None return self._files_cache + async def get_data(self) -> bytes: + """Return the raw request body as bytes. + + Returns: + The raw body bytes of the request. + """ + return await self._request.body() + class DashboardWebSocket: def __init__(self, websocket: WebSocket) -> None: