mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-14 01:43:41 +08:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user