mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-21 02:17:57 +08:00
tier: support remote file attributes and remember the file extension
This commit is contained in:
@@ -75,13 +75,13 @@ func (s *S3BackendStorage) NewStorageFile(key string, tierInfo *volume_server_pb
|
||||
return f
|
||||
}
|
||||
|
||||
func (s *S3BackendStorage) CopyFile(f *os.File, fn func(progressed int64, percentage float32) error) (key string, size int64, err error) {
|
||||
func (s *S3BackendStorage) CopyFile(f *os.File, attributes map[string]string, fn func(progressed int64, percentage float32) error) (key string, size int64, err error) {
|
||||
randomUuid, _ := uuid.NewRandom()
|
||||
key = randomUuid.String()
|
||||
|
||||
glog.V(1).Infof("copying dat file of %s to remote s3.%s as %s", f.Name(), s.id, key)
|
||||
|
||||
size, err = uploadToS3(s.conn, f.Name(), s.bucket, key, fn)
|
||||
size, err = uploadToS3(s.conn, f.Name(), s.bucket, key, attributes, fn)
|
||||
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user