file size support set file length
use Attr.FileSize and TotalChunkSize to determine file size
This commit is contained in:
@@ -208,7 +208,7 @@ 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.TotalSize(entry.Chunks))),
|
||||
Size: aws.Int64(int64(filer2.FileSize(entry))),
|
||||
ETag: aws.String("\"" + filer2.ETag(entry) + "\""),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ func (s3a *S3ApiServer) listFilerEntries(bucket string, originalPrefix string, m
|
||||
Key: fmt.Sprintf("%s%s", dir[len(bucketPrefix):], entry.Name),
|
||||
LastModified: time.Unix(entry.Attributes.Mtime, 0).UTC(),
|
||||
ETag: "\"" + filer2.ETag(entry) + "\"",
|
||||
Size: int64(filer2.TotalSize(entry.Chunks)),
|
||||
Size: int64(filer2.FileSize(entry)),
|
||||
Owner: CanonicalUser{
|
||||
ID: fmt.Sprintf("%x", entry.Attributes.Uid),
|
||||
DisplayName: entry.Attributes.UserName,
|
||||
|
||||
Reference in New Issue
Block a user