|
|
|
@ -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 {
|
|
|
|
|