This commit is contained in:
withchao
2023-07-12 13:58:20 +08:00
parent 84f8074d6a
commit 406a77d5b8
3 changed files with 24 additions and 24 deletions
+8 -8
View File
@@ -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 {