mediapod_client 1.0.0
mediapod_client: ^1.0.0 copied to clipboard
Dart client for Mediapod - a self-hosted media service. Upload images and videos, generate signed imgproxy URLs for image transformations, and manage media assets. Deploy with Docker, integrate with Flutter.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2024-12-02 #
Added #
API Client
MediapodClient- Full-featured HTTP client for the Mediapod APIMediapodClient.fromEnvironment()- Factory constructor using env vars- Upload initialization with presigned URL generation
- Chunked file uploads with progress tracking
- Upload completion and asset management
- Asset listing, retrieval, and deletion
- Configurable timeout and error handling
ImgProxy Integration
ImgProxySigner- HMAC-SHA256 URL signing for imgproxybuildImageUrl()- Convenience method for common operationssignUrl()- Low-level URL signingsignUrlWithExpiry()- Time-limited signed URLs- Support for resize, quality, format, and gravity options
Models
Asset- Media asset with metadata (dimensions, duration, state)InitUploadResponse- Presigned URL and upload detailsListAssetsResponse- Paginated asset listingMediaApiError- Structured error handling
Platform Support
- Web platform support with XMLHttpRequest for uploads
- Native platform support with dart:io
- Conditional imports for cross-platform compatibility
Security #
- Environment-based configuration (no hardcoded credentials)
- Secure HMAC-SHA256 URL signing
- Presigned URL token handling