SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
add fileId to UploadWithRetry return result
chrislua3553da7f7ce
diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.goindex e20087ce45..a196d25f3b 100644--- a/weed/command/filer_copy.go+++ b/weed/command/filer_copy.go@@ -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, offPairMap: nil,},func(host, fileId string) string {- finalFileId = fileIdreturn fmt.Sprintf("http://%s/%s", host, fileId)},reader,diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.goindex 76f55523a0..c5d2ce7c97 100644--- a/weed/operation/upload_content.go+++ b/weed/operation/upload_content.go@@ -80,10 +80,10 @@ func init() {// UploadWithRetry will retry both assigning volume request and uploading content// The option parameter does not need to specify UploadUrl and Jwt, which will come from assigning volume.-func UploadWithRetry(filerClient filer_pb.FilerClient, assignRequest *filer_pb.AssignVolumeRequest, uploadOption *UploadOption, genFileUrlFn func(host, fileId string) string, reader io.Reader) (uploadResult *UploadResult, err error, data []byte) {+func UploadWithRetry(filerClient filer_pb.FilerClient, assignRequest *filer_pb.AssignVolumeRequest, uploadOption *UploadOption, genFileUrlFn func(host, fileId string) string, reader io.Reader) (fileId string, uploadResult *UploadResult, err error, data []byte) {doUploadFunc := func() error {- var fileId, host string+ var host stringvar auth security.EncodedJwt// grpc assign volume