diff --git a/pkg/common/db/s3/cos/cos.go b/pkg/common/db/s3/cos/cos.go index d355b2f0b..a6c958813 100644 --- a/pkg/common/db/s3/cos/cos.go +++ b/pkg/common/db/s3/cos/cos.go @@ -233,14 +233,14 @@ func (c *Cos) ListUploadedParts(ctx context.Context, uploadID string, name strin func (c *Cos) AccessURL(ctx context.Context, name string, expire time.Duration, opt *s3.AccessURLOption) (string, error) { reqParams := make(url.Values) - if opt != nil { - if opt.ContentType != "" { - reqParams.Set("Content-Type", opt.ContentType) - } - if opt.ContentDisposition != "" { - reqParams.Set("Content-Disposition", opt.ContentDisposition) - } - } + //if opt != nil { + // if opt.ContentType != "" { + // reqParams.Set("Content-Type", opt.ContentType) + // } + // if opt.ContentDisposition != "" { + // reqParams.Set("Content-Disposition", opt.ContentDisposition) + // } + //} if expire <= 0 { expire = time.Hour * 24 * 365 * 99 // 99 years } else if expire < time.Second { diff --git a/pkg/common/db/s3/minio/minio.go b/pkg/common/db/s3/minio/minio.go index 6949bcb4c..c6070bc02 100644 --- a/pkg/common/db/s3/minio/minio.go +++ b/pkg/common/db/s3/minio/minio.go @@ -229,14 +229,14 @@ func (m *Minio) ListUploadedParts(ctx context.Context, uploadID string, name str func (m *Minio) AccessURL(ctx context.Context, name string, expire time.Duration, opt *s3.AccessURLOption) (string, error) { reqParams := make(url.Values) - if opt != nil { - if opt.ContentType != "" { - reqParams.Set("Content-Type", opt.ContentType) - } - if opt.ContentDisposition != "" { - reqParams.Set("Content-Disposition", opt.ContentDisposition) - } - } + //if opt != nil { + // if opt.ContentType != "" { + // reqParams.Set("Content-Type", opt.ContentType) + // } + // if opt.ContentDisposition != "" { + // reqParams.Set("Content-Disposition", opt.ContentDisposition) + // } + //} if expire <= 0 { expire = time.Hour * 24 * 365 * 99 // 99 years } else if expire < time.Second { diff --git a/pkg/common/db/s3/oss/oss.go b/pkg/common/db/s3/oss/oss.go index 51abcb46c..cd54c341b 100644 --- a/pkg/common/db/s3/oss/oss.go +++ b/pkg/common/db/s3/oss/oss.go @@ -242,14 +242,14 @@ func (o *OSS) ListUploadedParts(ctx context.Context, uploadID string, name strin func (o *OSS) AccessURL(ctx context.Context, name string, expire time.Duration, opt *s3.AccessURLOption) (string, error) { var opts []oss.Option - if opt != nil { - if opt.ContentType != "" { - opts = append(opts, oss.ContentType(opt.ContentType)) - } - if opt.ContentDisposition != "" { - opts = append(opts, oss.ContentDisposition(opt.ContentDisposition)) - } - } + //if opt != nil { + // if opt.ContentType != "" { + // opts = append(opts, oss.ContentType(opt.ContentType)) + // } + // if opt.ContentDisposition != "" { + // opts = append(opts, oss.ContentDisposition(opt.ContentDisposition)) + // } + //} if expire <= 0 { expire = time.Hour * 24 * 365 * 99 // 99 years } else if expire < time.Second {