aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-09-03 10:06:09 +0800
committerGitHub <noreply@github.com>2020-09-03 10:06:09 +0800
commit23baa3c36ce468a36d89abae59f4411cdc446043 (patch)
treed2e9d7e90530cd14078cc459c7dd1d4ec1ad3e01 /weed/s3api
parent44a56b158e4637bd70d3fcf8ddc9107973b60558 (diff)
parent645a4af3db6fa97440fcaca632bb1ddd939f8268 (diff)
downloadseaweedfs-23baa3c36ce468a36d89abae59f4411cdc446043.tar.xz
seaweedfs-23baa3c36ce468a36d89abae59f4411cdc446043.zip
Merge pull request #14 from chrislusf/master
sync
Diffstat (limited to 'weed/s3api')
-rw-r--r--weed/s3api/filer_multipart.go8
-rw-r--r--weed/s3api/s3api_objects_list_handlers.go6
2 files changed, 7 insertions, 7 deletions
diff --git a/weed/s3api/filer_multipart.go b/weed/s3api/filer_multipart.go
index a67a86454..4eb9bf32c 100644
--- a/weed/s3api/filer_multipart.go
+++ b/weed/s3api/filer_multipart.go
@@ -12,7 +12,7 @@ import (
"github.com/aws/aws-sdk-go/service/s3"
"github.com/google/uuid"
- "github.com/chrislusf/seaweedfs/weed/filer2"
+ "github.com/chrislusf/seaweedfs/weed/filer"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
)
@@ -108,7 +108,7 @@ func (s3a *S3ApiServer) completeMultipartUpload(input *s3.CompleteMultipartUploa
CompleteMultipartUploadOutput: s3.CompleteMultipartUploadOutput{
Location: aws.String(fmt.Sprintf("http://%s%s/%s", s3a.option.Filer, dirName, entryName)),
Bucket: input.Bucket,
- ETag: aws.String("\"" + filer2.ETagChunks(finalParts) + "\""),
+ ETag: aws.String("\"" + filer.ETagChunks(finalParts) + "\""),
Key: objectKey(input.Key),
},
}
@@ -208,8 +208,8 @@ func (s3a *S3ApiServer) listObjectParts(input *s3.ListPartsInput) (output *ListP
output.Parts = append(output.Parts, &s3.Part{
PartNumber: aws.Int64(int64(partNumber)),
LastModified: aws.Time(time.Unix(entry.Attributes.Mtime, 0).UTC()),
- Size: aws.Int64(int64(filer2.FileSize(entry))),
- ETag: aws.String("\"" + filer2.ETag(entry) + "\""),
+ Size: aws.Int64(int64(filer.FileSize(entry))),
+ ETag: aws.String("\"" + filer.ETag(entry) + "\""),
})
}
}
diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.go
index 254a99275..b6779dfb7 100644
--- a/weed/s3api/s3api_objects_list_handlers.go
+++ b/weed/s3api/s3api_objects_list_handlers.go
@@ -12,7 +12,7 @@ import (
"strings"
"time"
- "github.com/chrislusf/seaweedfs/weed/filer2"
+ "github.com/chrislusf/seaweedfs/weed/filer"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
)
@@ -139,8 +139,8 @@ func (s3a *S3ApiServer) listFilerEntries(bucket string, originalPrefix string, m
contents = append(contents, ListEntry{
Key: fmt.Sprintf("%s/%s", dir, entry.Name)[len(bucketPrefix):],
LastModified: time.Unix(entry.Attributes.Mtime, 0).UTC(),
- ETag: "\"" + filer2.ETag(entry) + "\"",
- Size: int64(filer2.FileSize(entry)),
+ ETag: "\"" + filer.ETag(entry) + "\"",
+ Size: int64(filer.FileSize(entry)),
Owner: CanonicalUser{
ID: fmt.Sprintf("%x", entry.Attributes.Uid),
DisplayName: entry.Attributes.UserName,