Skip to content

Commit

Permalink
SDK: Fix download action (#2842)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-WWU-IT authored May 16, 2022
1 parent 57c7bd2 commit b62ead5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/sdk-download-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix download action in SDK

The download action was no longer working in the SDK (used by our testing probes); this PR fixes the underlying issue.

https://github.com/cs3org/reva/pull/2842
2 changes: 1 addition & 1 deletion pkg/sdk/action/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (action *DownloadAction) Download(fileInfo *storage.ResourceInfo) ([]byte,

func (action *DownloadAction) initiateDownload(fileInfo *storage.ResourceInfo) (*gateway.InitiateFileDownloadResponse, error) {
// Initiating a download request gets us the download endpoint for the specified resource
req := &provider.InitiateFileDownloadRequest{Ref: &provider.Reference{ResourceId: fileInfo.Id}}
req := &provider.InitiateFileDownloadRequest{Ref: &provider.Reference{Path: fileInfo.Path}}
res, err := action.session.Client().InitiateFileDownload(action.session.Context(), req)
if err := net.CheckRPCInvocation("initiating download", res, err); err != nil {
return nil, err
Expand Down

0 comments on commit b62ead5

Please sign in to comment.