From ba690987ebb142ce3de2b3bba569d10ce9a6c1cd Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 16 Oct 2026 20:30:31 -0700 Subject: [PATCH] Document zip auto-extract for filer and S3 PutObject --- Amazon-S3-API.md | 2 +- Filer-Server-API.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Amazon-S3-API.md b/Amazon-S3-API.md index 3e5e6ba..9b6f439 100644 --- a/Amazon-S3-API.md +++ b/Amazon-S3-API.md @@ -135,7 +135,7 @@ For IAM action names used in bucket policies (e.g., `s3:ListBucketMultipartUploa | ListObjectsV2 | Yes | | | ListObjectVersions | Yes | See [[S3 Object Versioning]] | | PostObject | Yes | Browser-based form uploads via POST policy | -| PutObject | Yes | Supports SSE, user metadata (`x-amz-meta-*`), conditional headers | +| PutObject | Yes | Supports SSE, user metadata (`x-amz-meta-*`), conditional headers, zip auto-extract (`?extract=zip`, `X-Seaweedfs-Extract: zip`, or `x-amz-meta-snowball-auto-extract` writes each member as its own object under the key's directory) | | PutObjectAcl | Yes | | | PutObjectLegalHold | Yes | | | PutObjectRetention | Yes | | diff --git a/Filer-Server-API.md b/Filer-Server-API.md index 97b33f8..b76704c 100644 --- a/Filer-Server-API.md +++ b/Filer-Server-API.md @@ -36,6 +36,8 @@ You can append to any HTTP API with &pretty=y to see a formatted json output. | ttl | time to live, examples, 3m: 3 minutes, 4h: 4 hours, 5d: 5 days, 6w: 6 weeks, 7M: 7 months, 8y: 8 years | empty | | maxMB | max chunk size | empty | | mode | file mode | 0660 | +| extract | if "zip", write an uploaded zip archive's members as individual files under the destination directory instead of storing the archive | empty | +| extract.keep | with `extract=zip`, also store the archive itself | false | | offset | incompatible with `op=append`. Defines the number of bytes from the file beginning to insert the uploaded chunk | empty | | op | file operation, currently only support "append", incompatible with `offset=`. | empty | | skipCheckParentDir | Ensuring parent directory exists cost one metadata API call. Skipping this can reduce network latency. | false | @@ -67,6 +69,8 @@ Examples: {"name":"report.js","size":5514} > curl -T test.yaml http://localhost:8888/test.yaml?op=append # append to an file by PUT {"name":"test.yaml","size":866} +> curl -T bundle.zip "http://localhost:8888/media/?extract=zip" # extract a zip archive server-side +{"name":"bundle.zip","extracted":[{"name":"photo.png","size":12345},{"name":"docs/readme.txt","size":678}]} > curl -H "Accept: application/json" "http://localhost:8888/javascript/?pretty=y" # list all files under /javascript/ { "Path": "/javascript",