mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-13 07:19:18 +01:00
add fileId to UploadWithRetry return result
This commit is contained in:
1 parent
d49d0a9fc2
commit
a3553da7f7
2 files changed
+3
-5
No files matched your search
@@ -585,8 +585,7 @@ func detectMimeType(f *os.File) string {
|
||||
|
||||
func (worker *FileCopyWorker) saveDataAsChunk(reader io.Reader, name string, offset int64) (chunk *filer_pb.FileChunk, err error) {
|
||||
|
||||
var finalFileId string
|
||||
uploadResult, flushErr, _ := operation.UploadWithRetry(
|
||||
finalFileId, uploadResult, flushErr, _ := operation.UploadWithRetry(
|
||||
worker,
|
||||
&filer_pb.AssignVolumeRequest{
|
||||
Count: 1,
|
||||
@@ -604,7 +603,6 @@ func (worker *FileCopyWorker) saveDataAsChunk(reader io.Reader, name string, off
|
||||
PairMap: nil,
|
||||
},
|
||||
func(host, fileId string) string {
|
||||
finalFileId = fileId
|
||||
return fmt.Sprintf("http://%s/%s", host, fileId)
|
||||
},
|
||||
reader,
|
||||
|
||||
Reference in new issue
Block a user