(key: str, body: bytes, content_type: str, content_encoding: Optional[str])
| 95 | |
| 96 | |
| 97 | def _put_bytes_sync(key: str, body: bytes, content_type: str, content_encoding: Optional[str]) -> str: |
| 98 | params = { |
| 99 | "Bucket": R2_BUCKET, |
| 100 | "Key": key, |
| 101 | "Body": body, |
| 102 | "ContentType": content_type, |
| 103 | } |
| 104 | if content_encoding: |
| 105 | params["ContentEncoding"] = content_encoding |
| 106 | resp = _get_client().put_object(**params) |
| 107 | return resp.get("ETag") |
| 108 | |
| 109 | |
| 110 | def _get_bytes_sync(key: str) -> Optional[Tuple[bytes, str]]: |
nothing calls this directly
no test coverage detected