s3 fix get fake dir object key (#4390)

This commit is contained in:
Konstantin Lebedev
2023-04-11 19:36:22 +05:00
committed by GitHub
parent d1ce89950e
commit 130bc3e668
3 changed files with 5 additions and 5 deletions

View File

@@ -9,4 +9,5 @@ const (
SeaweedStorageDestinationHeader = "x-seaweedfs-destination"
MultipartUploadsFolder = ".uploads"
FolderMimeType = "httpd/unix-directory"
)

View File

@@ -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 {