Client.Storage.S3 (Voile v0.1.26)

Copy Markdown View Source

S3-compatible storage adapter (works with AWS S3, Backblaze B2, MinIO, etc.)

This adapter reads configuration at runtime, allowing you to switch between S3 and local storage without recompiling.

Summary

Functions

Adapter-friendly presign wrapper.

Generate a presigned GET URL for the given S3 file key.

Functions

delete(file_url)

extract_file_key_from_url(url)

presign(file_key, opts \\ [])

Adapter-friendly presign wrapper.

presign_get(file_key, expires_seconds \\ 900)

Generate a presigned GET URL for the given S3 file key.

NOTE: This implementation assumes a path-style URL format of the form {endpoint}/{bucket}/{key}. If you use virtual-hosted style (bucket as subdomain) you may need to adjust the canonical URI and host construction.