Storage Integration
Connect Tusflow to any AWS S3-compatible storage service
We currently support AWS S3, but we're working to add support for GCS and Azure soon. Stay tuned for updates!
Overview
Tusflow supports integration with any AWS S3-compatible storage service, including Cloudflare R2, Tigris, and others. This flexibility allows you to choose the best storage solution for your needs.
Supported Storage Services
- AWS S3: The original and most widely used object storage service.
- Cloudflare R2: A cost-effective alternative with no egress fees.
- Tigris: A scalable and performant storage solution.
- Other S3-Compatible Services: Any service that supports the S3 API.
Configuration
To connect Tusflow to your chosen storage service, configure the following environment variables in your wrangler.toml
file:
Example Configuration
AWS S3
Cloudflare R2
Tigris
Implementation Details
Tusflow uses the AWS SDK to interact with S3-compatible storage services. The following code snippet demonstrates how to initialize the S3 client:
Best Practices
-
Security
- Use IAM roles and policies to restrict access
- Rotate access keys regularly
- Use environment variables to store sensitive information
-
Performance
- Choose the closest region to your users
- Enable transfer acceleration if supported
- Monitor storage usage and costs
-
Reliability
- Enable versioning for data protection
- Use lifecycle policies to manage data retention
- Implement backup and disaster recovery plans
Ensure your storage service is configured correctly to handle large file uploads and resumable transfers.
Last updated on