feat: add object tagging support

Implements object tagging capabilities (v0.14.0) including:
- Core APIs: PutObjectTagging, GetObjectTagging, DeleteObjectTagging
- Integration with FilePut, FileUpload, and CopyObject operations
- Helper functions for URL-encoded tag header formatting
- Comprehensive input validation (max 10 tags, required fields)

Addresses specific compatibility issues with MinIO and Cloudflare R2:
- Implements a 2-step workaround for CopyObject (copy first, then tag) to avoid SignatureDoesNotMatch errors caused by the x-amz-tagging-directive header on non-AWS providers.

Includes comprehensive integration tests and documentation updates.
This commit is contained in:
Rohan Verma
2025-11-27 16:14:32 +05:30
parent ba9ef916bc
commit 11cad3573f
6 changed files with 923 additions and 6 deletions
+23 -6
View File
@@ -101,17 +101,34 @@ Advanced Features Implemented:
---
## v0.14.0 - Object Tagging
## v0.14.0 - Object Tagging ✅ COMPLETED
**Scope**: Metadata management
**Size**: Small (4 APIs, ~200 LOC)
**Size**: Small (4 APIs, ~250 LOC)
**Released**: Nov 27, 2025
- [ ] PutObjectTagging
- [ ] GetObjectTagging
- [ ] DeleteObjectTagging
- [ ] Tagging support in Put/Upload/Copy
Core APIs:
- [x] PutObjectTagging
- [x] GetObjectTagging
- [x] DeleteObjectTagging
Tagging Support in Operations:
- [x] FilePut (PUT upload)
- [x] FileUpload (POST upload) - AWS S3 only, MinIO limited
- [x] CopyObject - AWS S3 supported, MinIO/R2 handled automatically
Features Implemented:
- [x] Put/get/delete tags on existing objects (up to 10 tags per object)
- [x] Set tags during object upload operations
- [x] Tags field in UploadInput and CopyObjectInput
- [x] URL-encoded tag header formatting
- [x] Input validation (max 10 tags, required fields)
- [x] Integration tests with MinIO (and workaround for signature issues)
- [x] Comprehensive documentation in README
**Why**: Common requirement for organization/billing. Simple XML operations.
**Note**: Some MinIO limitations exist for tagging via POST uploads. CopyObject tagging is handled via a 2-step process (copy then tag) to support both AWS and MinIO/R2.
---
## v0.15.0 - Object Versioning