upload_to_r2_compressed
Documentation for eth_defi.research.sparkline.upload_to_r2_compressed function.
- upload_to_r2_compressed(payload, bucket_name, object_name, endpoint_url, access_key_id, secret_access_key, content_type)
Uploads a the vault sparklines payload to a Cloudflare R2 bucket.
Exported to the frontend listings
Compress SVGs with gzip
- Parameters
payload (bytes) – The bytes data to upload.
bucket_name (str) – The name of the R2 bucket.
object_name (str) – The destination object name (e.g., “my-image.png”).
account_id – Your Cloudflare R2 account ID.
access_key_id (str) – Your R2 access key ID.
secret_access_key (str) – Your R2 secret access key.
content_type (str) – The MIME type of the file.
endpoint_url (str) –