aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2023-04-11 19:36:22 +0500
committerGitHub <noreply@github.com>2023-04-11 07:36:22 -0700
commit130bc3e66839cd514a60f0f58600c7432ebf1564 (patch)
treed26e5b4dbf57140c4b494519ab5b9b238c068779 /weed/s3api
parentd1ce89950ea2784a6d4a01e6a0132f44a2e4ee38 (diff)
downloadseaweedfs-130bc3e66839cd514a60f0f58600c7432ebf1564.tar.xz
seaweedfs-130bc3e66839cd514a60f0f58600c7432ebf1564.zip
s3 fix get fake dir object key (#4390)
Diffstat (limited to 'weed/s3api')
-rw-r--r--weed/s3api/s3_constants/s3_actions.go1
-rw-r--r--weed/s3api/s3api_object_handlers.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/weed/s3api/s3_constants/s3_actions.go b/weed/s3api/s3_constants/s3_actions.go
index 721c57f71..17087ae03 100644
--- a/weed/s3api/s3_constants/s3_actions.go
+++ b/weed/s3api/s3_constants/s3_actions.go
@@ -9,4 +9,5 @@ const (
SeaweedStorageDestinationHeader = "x-seaweedfs-destination"
MultipartUploadsFolder = ".uploads"
+ FolderMimeType = "httpd/unix-directory"
)
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go
index d63a68e4b..05e716015 100644
--- a/weed/s3api/s3api_object_handlers.go
+++ b/weed/s3api/s3api_object_handlers.go
@@ -99,7 +99,7 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request)
s3a.option.BucketsPath, bucket+strings.TrimSuffix(object, "/"),
func(entry *filer_pb.Entry) {
if objectContentType == "" {
- objectContentType = "httpd/unix-directory"
+ objectContentType = s3_constants.FolderMimeType
}
entry.Attributes.Mime = objectContentType
}); err != nil {