MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / _file_tuple

Method _file_tuple

astrbot/dashboard/asgi_runtime.py:275–282  ·  view source on GitHub ↗
(cls, value: Any)

Source from the content-addressed store, hash-verified

273
274 @classmethod
275 def _file_tuple(cls, value: Any):
276 stream = value.stream
277 if hasattr(stream, "seek"):
278 stream.seek(0)
279 content = stream.read()
280 filename = getattr(value, "filename", "upload.bin")
281 content_type = getattr(value, "content_type", None)
282 return filename, content, content_type
283
284 @classmethod
285 def _normalize_data(cls, data: Any):

Callers 2

_normalize_dataMethod · 0.80
_normalize_filesMethod · 0.80

Calls 2

seekMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected