mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 20:45:57 +08:00
s3 url
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user