mirror of
https://github.com/eiblog/eiblog.git
synced 2026-03-01 00:34:58 +08:00
使用github的七牛SDK,配置名称Kodo->Qiniu
This commit is contained in:
8
vendor/github.com/qiniu/api.v7/cdn/anti_leech.go
generated
vendored
8
vendor/github.com/qiniu/api.v7/cdn/anti_leech.go
generated
vendored
@@ -7,10 +7,9 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// CreateTimestampAntileechURL 构建带时间戳防盗链的链接
|
||||
// encryptKey 七牛防盗链key
|
||||
func CreateTimestampAntileechURL(urlStr string, encryptKey string, durationInSeconds int64) (antileechURL string, err error) {
|
||||
|
||||
// CreateTimestampAntileechURL 用来构建七牛CDN时间戳防盗链的访问链接
|
||||
func CreateTimestampAntileechURL(urlStr string, encryptKey string,
|
||||
durationInSeconds int64) (antileechURL string, err error) {
|
||||
u, err := url.Parse(urlStr)
|
||||
if err != nil {
|
||||
return
|
||||
@@ -27,7 +26,6 @@ func CreateTimestampAntileechURL(urlStr string, encryptKey string, durationInSec
|
||||
if u.RawQuery == "" {
|
||||
antileechURL = u.String() + "?" + q.Encode()
|
||||
} else {
|
||||
|
||||
antileechURL = u.String() + "&" + q.Encode()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user