Skip to content

Storage providers

PyWacli can sync received media off-device to object storage, or keep it on local disk. You can configure multiple storage entries at once, each with its own per-media-type toggles.

Per-entry fields

Field Applies to Description
provider all s3, r2, b2, or local
store_image all Sync images to this target
store_video all Sync videos to this target
store_document all Sync documents to this target
endpoint s3 / r2 / b2 Service endpoint URL
access_key_id s3 / r2 / b2 Access key
secret_access_key s3 / r2 / b2 Secret key
region s3 / r2 / b2 Region
bucket_name s3 / r2 / b2 Target bucket
local_path local Filesystem directory for local storage
id all Auto-assigned entry id

Providers

{
  "provider": "s3",
  "store_image": true,
  "store_video": true,
  "store_document": true,
  "endpoint": "https://s3.us-east-1.amazonaws.com",
  "access_key_id": "AKIA…",
  "secret_access_key": "…",
  "region": "us-east-1",
  "bucket_name": "whatsapp-media"
}

Works with any S3-compatible endpoint — including LocalStack (http://localhost:4566) for local testing.

{
  "provider": "r2",
  "store_image": true,
  "store_video": true,
  "store_document": true,
  "endpoint": "https://<account>.r2.cloudflarestorage.com",
  "access_key_id": "…",
  "secret_access_key": "…",
  "region": "auto",
  "bucket_name": "whatsapp-media"
}
{
  "provider": "b2",
  "store_image": true,
  "store_video": true,
  "store_document": true,
  "endpoint": "https://s3.us-west-002.backblazeb2.com",
  "access_key_id": "…",
  "secret_access_key": "…",
  "region": "us-west-002",
  "bucket_name": "whatsapp-media"
}
{
  "provider": "local",
  "store_image": true,
  "store_video": true,
  "store_document": false,
  "local_path": "/data/pywacli-media"
}

Sync status

Every upload writes a handshake record (success, or the failure reason). Inspect it from the media viewer detail view — a quick way to catch bad credentials, missing buckets, or permission errors.

Mix and match

Want images in R2 but documents only on local disk? Add two entries with different store_* toggles. Each received file is evaluated against every entry.