Updated GetArtifacts

* No longer base64 encode, as the bytes automatically do that.
* Change GetArtifactDownload to just GetArtifact for consistency
* Change url to have the key on the end instead of a query parameter.
This commit is contained in:
Andrey Melnikov
2020-02-26 13:40:05 -08:00
parent ad3b7b4208
commit 9fa50edbed
6 changed files with 116 additions and 111 deletions

View File

@@ -2,7 +2,6 @@ package server
import (
"context"
"encoding/base64"
"math"
"time"
@@ -422,14 +421,12 @@ func (s *WorkflowServer) GetArtifact(ctx context.Context, req *api.GetArtifactRe
return nil, err
}
data, err := client.GetArtifactDownload(req.Namespace, req.Name, req.Key)
data, err := client.GetArtifact(req.Namespace, req.Name, req.Key)
if err != nil {
return nil, err
}
strValue := base64.StdEncoding.EncodeToString(data)
return &api.ArtifactResponse{
Data: strValue,
Data: data,
}, nil
}