serverpod_cloud_storage_s3_compat library

Base package for S3-compatible cloud storage integrations with Serverpod.

This package provides abstractions for building cloud storage integrations that work with S3-compatible APIs, including AWS S3, Google Cloud Storage (via S3 compatibility), Cloudflare R2, LocalStack, and other providers.

Key Components

Base Implementation

Endpoint Configuration

Provider-specific endpoint configs are in their respective packages:

  • AwsEndpointConfig in serverpod_cloud_storage_s3
  • GcpEndpointConfig in serverpod_cloud_storage_gcp
  • R2EndpointConfig in serverpod_cloud_storage_r2

Upload Strategy

S3 Client

Classes

CustomEndpointConfig
Custom S3-compatible endpoint configuration.
MultipartPostUploadStrategy
Upload strategy using multipart POST with presigned policy.
Policy
Represents an S3 presigned POST policy.
PresignedPutUploadStrategy
Upload strategy using PUT with presigned URLs.
S3Client
Client for making signed requests to S3-compatible storage APIs.
S3CompatCloudStorage
Base class for S3-compatible cloud storage implementations.
S3EndpointConfig
Configuration for S3-compatible endpoint URLs.
S3UploadStrategy
Strategy for uploading files to S3-compatible storage.
SignedRequestParams
Contains the URI and headers for a signed S3 request.

Extensions

UriPathExtension on Uri
Extension for appending paths to URIs.

Exceptions / Errors

NoPermissionsException
Exception thrown when the API returns a 403 Forbidden response.
S3Exception
Exception thrown when an S3-compatible API returns an error.