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

Method read

astrbot/api/web.py:130–139  ·  view source on GitHub ↗

Read bytes from the uploaded file. Args: size: Maximum number of bytes to read. Use -1 to read all bytes. Returns: File bytes.

(self, size: int = -1)

Source from the content-addressed store, hash-verified

128 output.write(chunk)
129
130 async def read(self, size: int = -1) -> bytes:
131 """Read bytes from the uploaded file.
132
133 Args:
134 size: Maximum number of bytes to read. Use -1 to read all bytes.
135
136 Returns:
137 File bytes.
138 """
139 return await self._upload_file.read(size)
140
141 async def write(self, data: bytes) -> None:
142 """Write bytes to the uploaded file object.

Callers 15

_simulated_stream_ttsFunction · 0.45
download_image_by_urlFunction · 0.45
file_to_base64Function · 0.45
_get_audio_magic_typeFunction · 0.45
tencent_silk_to_wavFunction · 0.45
get_installation_idMethod · 0.45
load_imageMethod · 0.45
_read_fileMethod · 0.45
loadMethod · 0.45
install_pluginMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_coze_api_clientFunction · 0.36