MCPcopy Index your code
hub / github.com/microsoft/playwright-python / file_payload_to_json

Function file_payload_to_json

playwright/_impl/_fetch.py:469–474  ·  view source on GitHub ↗
(payload: FilePayload)

Source from the content-addressed store, hash-verified

467
468
469def file_payload_to_json(payload: FilePayload) -> ServerFilePayload:
470 return ServerFilePayload(
471 name=payload["name"],
472 mimeType=payload["mimeType"],
473 buffer=base64.b64encode(payload["buffer"]).decode(),
474 )
475
476
477async def _form_data_field_to_form_field(name: str, value: Any) -> FormField:

Callers 2

_inner_fetchMethod · 0.85

Calls 1

ServerFilePayloadClass · 0.90

Tested by

no test coverage detected