feat: updated presigned url response to include the file size so client can decide if it can be displayed or not

This commit is contained in:
Andrey Melnikov
2021-07-30 14:01:38 -07:00
parent d226028b33
commit 8e6ef8d3eb
13 changed files with 463 additions and 815 deletions

View File

@@ -449,23 +449,6 @@ func (s *WorkflowServer) TerminateWorkflowExecution(ctx context.Context, req *ap
return &empty.Empty{}, nil
}
func (s *WorkflowServer) GetArtifact(ctx context.Context, req *api.GetArtifactRequest) (*api.ArtifactResponse, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", "argoproj.io", "workflows", req.Uid)
if err != nil || !allowed {
return nil, err
}
data, err := client.GetArtifact(req.Namespace, req.Uid, req.Key)
if err != nil {
return nil, err
}
return &api.ArtifactResponse{
Data: data,
}, nil
}
func (s *WorkflowServer) UpdateWorkflowExecutionStatus(ctx context.Context, req *api.UpdateWorkflowExecutionStatusRequest) (*empty.Empty, error) {
client := getClient(ctx)
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", "argoproj.io", "workflows", req.Uid)