image_service_client 0.0.1-dev.6
image_service_client: ^0.0.1-dev.6 copied to clipboard
A client library of the "image service" server
Changelog #
All notable changes to the Image Service Client will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.1-dev.6 - 2025-10-21 #
Fixes #
- Fixed uploading image from token.
- Made API key nullable so it can be safely used in Flutter apps.
0.0.1-dev.5 - 2025-10-20 #
Changed #
- BREAKING: Removed bucket support: Removed all bucket-related functionality
- Removed
bucketparameter fromuploadImage()(previouslyuploadImageWithFilename()) - Removed
bucketparameter fromuploadImageFromUrl() - Removed
bucketfield fromImageMetadatamodel - Removed
bucketfield fromUploadResponsemodel - All images now stored in root directory without bucket organization
- Endpoint paths changed from
/files/{bucket}/to/files/
- Removed
- BREAKING: Renamed method:
uploadImageWithFilename()→uploadImage()- Simplifies API by using
uploadImage()for direct filename uploads uploadImageWithToken()remains for token-based uploads
- Simplifies API by using
- BREAKING: Updated temporary upload token endpoints:
createTemporaryUploadUrl()now uses/upload-tokens(was/files/upload-tokens)uploadImageWithToken()now uses/upload-tokens/{token}(was/files/upload-tokens/{token})- Aligns with server's simplified routing structure
Removed #
- BREAKING: Removed
listImages()method- Method for listing all images has been removed
- Users should manage image metadata through their own systems
0.0.1-dev.4 - 2025-10-20 #
Added #
- Upload from URL: New method to upload images from public URLs
uploadImageFromUrl()- Fetch and store images from public URLs (requires API key)- Parameters:
url(required),fileName(optional),bucket(optional) - Server fetches the image with 10-second timeout
- Returns
UploadResponsewith URL and metadata - Throws
ImageServiceExceptionon errors (invalid URL, fetch failure, etc.)
- Updated README with upload from URL documentation and examples
- Added upload from URL example to example.dart
- Added 6 comprehensive test cases for upload from URL functionality
Changed #
- Updated endpoint paths for temporary upload tokens
createTemporaryUploadUrl()now uses/files/upload-tokens(was/upload_tokens)uploadImageWithToken()now uses/files/upload-tokens/{token}(was/upload_tokens/{token})- Aligns with server refactoring for better API consistency
- No functional changes, only path updates
0.0.1-dev.3 - 2025-10-20 #
Changed #
- BREAKING: Removed
uploadImage()method (multipart POST)- Use
uploadImageWithFilename()(PUT) oruploadImageWithToken()(POST with token) instead - This simplifies the API surface and aligns with the server's recommended upload patterns
- Use
- Refactored
getImage()to usegetImageUrl()internally, reducing code duplication
Fixed #
- Fixed missing Example 1 in example.dart that was causing undefined variable errors
- Added basic image upload example that defines
uploadResponsevariable - All examples now execute correctly without errors
- Added basic image upload example that defines
0.0.1-dev.2 - 2025-10-11 #
Added #
- Temporary Upload URLs: Secure, token-based upload functionality
createTemporaryUploadUrl()- Generate temporary upload token (requires API key)uploadImageWithToken()- Upload image using temporary token (no API key required)TemporaryUploadUrlmodel with full serialization support
- Support for uploading images without exposing API keys to client applications
- Updated examples demonstrating temporary upload workflow
Changed #
- Refactored imports to use consolidated models export
- Enhanced documentation with temporary upload URL usage examples
- Improved example application with additional upload scenarios
Security #
- Temporary tokens provide secure alternative to exposing API keys in client applications
- Tokens are single-use and expire after 15 minutes
- Same security validations apply (magic byte checking, file size limits)
0.0.1-dev.1 - 2025-10-10 #
Added #
- Initial release of Image Service Client
ImageServiceClientclass for interacting with the Image Service- Support for uploading images via multipart form (POST)
- Support for uploading images with custom filename (PUT)
- Image retrieval with optional transformations (width, height, quality)
- Image URL generation for direct access
- Image deletion functionality
- List all images with metadata
ImageMetadatamodel for image informationUploadResponsemodel for upload resultsImageTransformOptionsfor on-the-fly transformationsImageServiceExceptionfor error handling- Comprehensive test suite with 100% coverage
- Example application demonstrating all features
- Full documentation in README
Security #
- API key authentication via x-api-key header
- Support for custom HTTP client for testing and proxy configurations