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)
| 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. |
no outgoing calls