Skip to content

Commit

Permalink
Merge pull request #70 from gregsheremeta/remove-content-disposition-…
Browse files Browse the repository at this point in the history
…header

fix(backend): remove content disposition http header from artifact download
  • Loading branch information
openshift-merge-bot[bot] authored Aug 12, 2024
2 parents bbfb589 + 2829d61 commit d0ee4ca
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions backend/src/apiserver/storage/object_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package storage

import (
"bytes"
"fmt"
"github.com/kubeflow/pipelines/backend/src/common/util"
"github.com/kubeflow/pipelines/backend/src/v2/objectstore"
minio "github.com/minio/minio-go/v6"
Expand All @@ -25,7 +24,6 @@ import (
"path"
"regexp"
"sigs.k8s.io/yaml"
"strings"
"time"
)

Expand Down Expand Up @@ -139,15 +137,11 @@ func (m *MinioObjectStore) GetSignedUrl(bucketConfig *objectstore.Config, secret
return "", err
}

prefixSplit := strings.Split(bucketConfig.Prefix, "/")
filename := prefixSplit[len(prefixSplit)-1]
reqParams := make(url.Values)
reqParams.Set("response-content-disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))

key, err := objectstore.ArtifactKeyFromURI(artifactURI)
if err != nil {
return "", err
}
reqParams := make(url.Values)
signedUrl, err := s3Client.Presign("GET", bucketConfig.BucketName, key, expirySeconds, reqParams)
if err != nil {
return "", util.Wrap(err, "Failed to generate signed url")
Expand Down

0 comments on commit d0ee4ca

Please sign in to comment.