diff --git a/esti/lakectl_test.go b/esti/lakectl_test.go index 00823e09d0e..90ac9ca4c6e 100644 --- a/esti/lakectl_test.go +++ b/esti/lakectl_test.go @@ -111,7 +111,7 @@ func TestLakectlPreSignUpload(t *testing.T) { filePath := "ro_1k.1" vars["FILE_PATH"] = filePath - RunCmdAndVerifySuccessWithFile(t, Lakectl()+" fs upload -s files/ro_1k lakefs://"+repoName+"/"+mainBranch+"/"+filePath+" --pre-sign", false, "lakectl_fs_upload_pre_signed", vars) + RunCmdAndVerifySuccessWithFile(t, Lakectl()+" fs upload -s files/ro_1k lakefs://"+repoName+"/"+mainBranch+"/"+filePath+" --pre-sign", false, "lakectl_fs_upload", vars) } diff --git a/pkg/api/controller.go b/pkg/api/controller.go index 2fba88bc9bc..3ada84a058b 100644 --- a/pkg/api/controller.go +++ b/pkg/api/controller.go @@ -394,7 +394,7 @@ func (c *Controller) LinkPhysicalAddress(w http.ResponseWriter, r *http.Request, Mtime: entry.CreationDate.Unix(), Path: entry.Path, PathType: entryTypeObject, - PhysicalAddress: entry.PhysicalAddress, + PhysicalAddress: qk.Format(), SizeBytes: swag.Int64(entry.Size), } diff --git a/pkg/api/helpers/upload.go b/pkg/api/helpers/upload.go index 4625b42f695..498ddddf7b3 100644 --- a/pkg/api/helpers/upload.go +++ b/pkg/api/helpers/upload.go @@ -178,10 +178,7 @@ func clientUploadPreSignHelper(ctx context.Context, client apigen.ClientWithResp return nil, fmt.Errorf("link object to backing store: %w", err) } if linkResp.JSON200 != nil { - objStat := *linkResp.JSON200 - // this is a workaround for the fact that the API does not return the full physical address - objStat.PhysicalAddress = preSignURL - return &objStat, nil + return linkResp.JSON200, nil } if linkResp.JSON409 != nil { return nil, ErrConflict