feat: add CopyObject and DeleteObjects operations

Implements object manipulation capabilities for v0.11.0:
- CopyObject: server-side copy within/across buckets with metadata control
- DeleteObjects: batch delete up to 1000 objects in single request

Both operations follow AWS S3 API specification with proper:
- AWS Signature V4 signing
- XML request/response handling
- Content-MD5 and SHA256 headers
- Comprehensive input validation

Fixed DeleteObjects signature mismatch with MinIO by correcting the canonical
query string format for empty query parameter values (delete= instead of delete).
The writeQuery function now properly appends = to keys with empty values per
AWS Signature V4 specification.

CopyObject enables CLI mv commands. DeleteObjects enables efficient
batch operations for CLI sync/rm.

Tests: All CopyObject and DeleteObjects tests passing with MinIO.

"lets work on the object level operations"
This commit is contained in:
Rohan Verma
2025-11-27 01:18:57 +05:30
parent e410cc846e
commit 9a14996a0b
5 changed files with 559 additions and 23 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ func writeQuery(w io.Writer, r *http.Request) {
k = url.QueryEscape(k)
for _, v := range vs {
if v == "" {
a = append(a, k)
a = append(a, k+"=")
} else {
v = url.QueryEscape(v)
a = append(a, k+"="+v)