Skip to content

Commit

Permalink
Fix link physical address response to contain full path
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-har committed Oct 10, 2023
1 parent c0d5d31 commit 727f710
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/api/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func (c *Controller) LinkPhysicalAddress(w http.ResponseWriter, r *http.Request,
ContentType: swag.String(entry.ContentType),
Metadata: &metadata,
Mtime: entry.CreationDate.Unix(),
Path: entry.Path,
Path: qk.Format(),
PathType: entryTypeObject,
PhysicalAddress: entry.PhysicalAddress,
SizeBytes: swag.Int64(entry.Size),
Expand Down
5 changes: 1 addition & 4 deletions pkg/api/helpers/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 727f710

Please sign in to comment.