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