diff --git a/Amazon-S3-API.md b/Amazon-S3-API.md new file mode 100644 index 0000000..e6b8d8d --- /dev/null +++ b/Amazon-S3-API.md @@ -0,0 +1,33 @@ +To be compatible with Amazon S3 API, a separate "weed s3" command is provided. + +"weed s3" will start a stateless gateway server to bridge the Amazon S3 API to SeaweedFS Filer. + +Each bucket is stored in one collection, and mapped to folder /buckets/ by default. + +A bucket can be deleted efficiently by deleting the whole collection. + +Currently, the following APIs are supported. + +``` + // Object APIs + // PutObject + bucket.Methods("PUT").Path("/{object:.+}").HandlerFunc(s3a.PutObjectHandler) + // GetObject + bucket.Methods("GET").Path("/{object:.+}").HandlerFunc(s3a.GetObjectHandler) + // HeadObject + bucket.Methods("HEAD").Path("/{object:.+}").HandlerFunc(s3a.HeadObjectHandler) + // DeleteObject + bucket.Methods("DELETE").Path("/{object:.+}").HandlerFunc(s3a.DeleteObjectHandler) + + // Bucket APIs + // PutBucket + bucket.Methods("PUT").HandlerFunc(s3a.PutBucketHandler) + // DeleteBucket + bucket.Methods("DELETE").HandlerFunc(s3a.DeleteBucketHandler) + // HeadBucket + bucket.Methods("HEAD").HandlerFunc(s3a.HeadBucketHandler) + + // ListBuckets + apiRouter.Methods("GET").Path("/").HandlerFunc(s3a.ListBucketsHandler) + +``` \ No newline at end of file