MCPcopy Create free account
hub / github.com/AstrBotDevs/AstrBot / read_bytes

Method read_bytes

astrbot/core/utils/media_utils.py:157–159  ·  view source on GitHub ↗

Read the resolved local file.

(self)

Source from the content-addressed store, hash-verified

155 cleanup_paths: list[Path] = field(default_factory=list)
156
157 def read_bytes(self) -> bytes:
158 """Read the resolved local file."""
159 return self.path.read_bytes()
160
161 def to_base64(self) -> str:
162 """Read the resolved local file and return raw base64 data."""

Callers 15

to_base64Method · 0.95
to_bytesMethod · 0.80
to_base64_dataMethod · 0.80
upload_mediaMethod · 0.80
_prepare_media_itemMethod · 0.80
upload_to_cdnMethod · 0.80
upload_mediaMethod · 0.80
upload_assetMethod · 0.80
get_textMethod · 0.80
_runFunction · 0.80
from_strFunction · 0.80
upload_fileMethod · 0.80

Calls

no outgoing calls